1313doprint = True
1414flexible_true_trait = traits .Trait (
1515 True ,
16- { 'true' : True , 't' : True , 'yes' : True , 'y' : True , 'on' : True , True : True ,
16+ {'true' : True , 't' : True , 'yes' : True , 'y' : True , 'on' : True , True : True ,
1717 'false' : False , 'f' : False , 'no' : False , 'n' : False , 'off' : False , False : False
18- } )
19- flexible_false_trait = traits .Trait ( False , flexible_true_trait )
18+ })
19+ flexible_false_trait = traits .Trait (False , flexible_true_trait )
2020
2121colors = {
2222 'c' : '#00bfbf' ,
@@ -83,7 +83,7 @@ def hex_to_rgba(ob, name, val):
8383
8484def colorname_to_rgba (ob , name , val ):
8585 hex = colors [val .lower ()]
86- r ,g ,b = hex2color (hex )
86+ r ,g ,b = hex2color (hex )
8787 return RGBA (r ,g ,b ,1.0 )
8888colorname_to_rgba .info = 'a named color'
8989
@@ -102,7 +102,7 @@ def file_exists(ob, name, val):
102102 fh = file (val , 'r' )
103103 return val
104104
105- linestyles = ('-' , '--' , '-.' , ':' , 'steps' , 'None' )
105+ linestyles = ('-' , '--' , '-.' , ':' , 'steps' , 'None' )
106106TICKLEFT , TICKRIGHT , TICKUP , TICKDOWN = range (4 )
107107linemarkers = (None , '.' , ',' , 'o' , '^' , 'v' , '<' , '>' , 's' ,
108108 '+' , 'x' , 'd' , 'D' , '|' , '_' , 'h' , 'H' ,
@@ -116,23 +116,23 @@ def file_exists(ob, name, val):
116116
117117
118118class LineRC (traits .HasTraits ):
119- linewidth = traits .Float (0.5 )
120- linestyle = traits .Trait (* linestyles )
121- color = Color
122- marker = traits .Trait (* linemarkers )
119+ linewidth = traits .Float (0.5 )
120+ linestyle = traits .Trait (* linestyles )
121+ color = Color
122+ marker = traits .Trait (* linemarkers )
123123 markerfacecolor = Color
124124 markeredgecolor = Color
125125 markeredgewidth = traits .Float (0.5 )
126- markersize = traits .Float (6 )
127- antialiased = flexible_true_trait
128- data_clipping = flexible_false_trait
126+ markersize = traits .Float (6 )
127+ antialiased = flexible_true_trait
128+ data_clipping = flexible_false_trait
129129
130130
131131class PatchRC (traits .HasTraits ):
132- linewidth = traits .Float (1.0 )
132+ linewidth = traits .Float (1.0 )
133133 facecolor = Color
134134 edgecolor = Color
135- antialiased = flexible_true_trait
135+ antialiased = flexible_true_trait
136136
137137timezones = 'UTC' , 'US/Central' , 'ES/Eastern' # fixme: and many more
138138backends = ('GTKAgg' , 'Cairo' , 'GDK' , 'GTK' , 'Agg' ,
@@ -142,11 +142,11 @@ class PatchRC(traits.HasTraits):
142142
143143class RC (traits .HasTraits ):
144144 backend = traits .Trait (* backends )
145- interactive = flexible_false_trait
146- toolbar = traits .Trait ('toolbar2' , 'classic' , None )
147- timezone = traits .Trait (* timezones )
148- lines = traits .Trait (LineRC ())
149- patch = traits .Trait (PatchRC ())
145+ interactive = flexible_false_trait
146+ toolbar = traits .Trait ('toolbar2' , 'classic' , None )
147+ timezone = traits .Trait (* timezones )
148+ lines = traits .Trait (LineRC ())
149+ patch = traits .Trait (PatchRC ())
150150
151151rc = RC ()
152152rc .lines .color = 'r'
0 commit comments