Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit 426044d

Browse files
committed
Sweeping style pass for consistency
1 parent 671e965 commit 426044d

File tree

7 files changed

+88
-127
lines changed

7 files changed

+88
-127
lines changed

colormath/chromatic_adaptation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def apply_chromatic_adaptation(val_x, val_y, val_z, orig_illum, targ_illum,
6565
6666
http://brucelindbloom.com/ChromAdaptEval.html
6767
"""
68-
6968
# It's silly to have to do this, but some people may want to call this
7069
# function directly, so we'll protect them from messing up upper/lower case.
7170
adaptation = adaptation.lower()
@@ -102,7 +101,6 @@ def apply_chromatic_adaptation_on_color(color, targ_illum, adaptation='bradford'
102101
"""
103102
Convenience function to apply an adaptation directly to a Color object.
104103
"""
105-
106104
xyz_x = color.xyz_x
107105
xyz_y = color.xyz_y
108106
xyz_z = color.xyz_z

colormath/color_appearance_models.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
logger = logging.getLogger(__name__)
3535

3636

37-
class Nayatani95():
37+
class Nayatani95(object):
3838
"""
3939
**References**
4040
@@ -226,7 +226,7 @@ def xyz_to_rgb(cls, xyz):
226226
return cls.xyz_to_rgb_m.dot(xyz)
227227

228228

229-
class Hunt():
229+
class Hunt(object):
230230
"""
231231
**References**
232232
@@ -625,7 +625,7 @@ def _calculate_eccentricity_factor(hue_angle):
625625
return out
626626

627627

628-
class RLAB():
628+
class RLAB(object):
629629
"""
630630
**References**
631631
@@ -717,9 +717,10 @@ def __init__(self, x, y, z, x_n, y_n, z_n, y_n_abs, sigma, d):
717717
logger.debug('A: {}'.format(a))
718718
xyz_ref = self.R.dot(a).dot(Hunt.xyz_to_rgb_m).dot(xyz)
719719
else:
720-
# So we have an array. Since constructing huge multidimensional arrays might not bee the best idea,
721-
# we will handle each input dimension separately.
722-
# First figure out how many values we have to deal with.
720+
# So we have an array. Since constructing huge multidimensional
721+
# arrays might not bee the best idea, we will handle each input
722+
# dimension separately. First figure out how many values we have to
723+
# deal with.
723724
input_dim = len(x)
724725
# No create the ouput array that we will fill layer by layer
725726
xyz_ref = numpy.zeros((3, input_dim))
@@ -751,7 +752,7 @@ def __init__(self, x, y, z, x_n, y_n, z_n, y_n_abs, sigma, d):
751752
self._saturation = self.chroma / self.lightness
752753

753754

754-
class ATD95():
755+
class ATD95(object):
755756
"""
756757
**References**
757758
@@ -850,7 +851,7 @@ def _xyz_to_lms(xyz):
850851
return numpy.array([l, m, s])
851852

852853

853-
class LLAB():
854+
class LLAB(object):
854855
"""
855856
**References**
856857
@@ -992,7 +993,7 @@ def xyz_to_rgb(cls, xyz):
992993
return cls.xyz_to_rgb_m.dot(xyz / xyz[1])
993994

994995

995-
class CIECAM02():
996+
class CIECAM02(object):
996997
"""
997998
**References**
998999
@@ -1216,7 +1217,6 @@ class CIECAM02m1(CIECAM02):
12161217
* Wu, R. C., & Wardman, R. H. (2007). Proposed modification to the CIECAM02 colour appearance model to include the
12171218
simultaneous contrast effects. *Color Research & Application*, 32(2), 121-129.
12181219
"""
1219-
12201220
def __init__(self, x, y, z, x_w, y_w, z_w, x_b, y_b, z_b, l_a, c, n_c, f, p, d=False):
12211221
"""
12221222
:param x: X value of test sample :math:`X`.

0 commit comments

Comments
 (0)