@@ -905,25 +905,26 @@ class DialogLineprops(object):
905905 )
906906
907907 linestyles = [ls for ls in lines .Line2D .lineStyles if ls .strip ()]
908- linestyled = dict ([ ( s , i ) for i ,s in enumerate (linestyles )])
908+ linestyled = { s : i for i , s in enumerate (linestyles )}
909909
910-
911- markers = [m for m in markers .MarkerStyle .markers if cbook .is_string_like (m )]
912-
913- markerd = dict ([(s ,i ) for i ,s in enumerate (markers )])
910+ markers = [m for m in markers .MarkerStyle .markers
911+ if cbook .is_string_like (m )]
912+ markerd = {s : i for i , s in enumerate (markers )}
914913
915914 def __init__ (self , lines ):
916915 import gtk .glade
917916
918917 datadir = matplotlib .get_data_path ()
919918 gladefile = os .path .join (datadir , 'lineprops.glade' )
920919 if not os .path .exists (gladefile ):
921- raise IOError ('Could not find gladefile lineprops.glade in %s' % datadir )
920+ raise IOError (
921+ 'Could not find gladefile lineprops.glade in %s' % datadir )
922922
923923 self ._inited = False
924924 self ._updateson = True # suppress updates when setting widgets manually
925925 self .wtree = gtk .glade .XML (gladefile , 'dialog_lineprops' )
926- self .wtree .signal_autoconnect (dict ([(s , getattr (self , s )) for s in self .signals ]))
926+ self .wtree .signal_autoconnect (
927+ {s : getattr (self , s ) for s in self .signals })
927928
928929 self .dlg = self .wtree .get_widget ('dialog_lineprops' )
929930
@@ -947,7 +948,6 @@ def __init__(self, lines):
947948 self ._lastcnt = 0
948949 self ._inited = True
949950
950-
951951 def show (self ):
952952 'populate the combo box'
953953 self ._updateson = False
@@ -971,7 +971,6 @@ def get_active_line(self):
971971 line = self .lines [ind ]
972972 return line
973973
974-
975974 def get_active_linestyle (self ):
976975 'get the active lineinestyle'
977976 ind = self .cbox_linestyles .get_active ()
@@ -1005,8 +1004,6 @@ def _update(self):
10051004
10061005 line .figure .canvas .draw ()
10071006
1008-
1009-
10101007 def on_combobox_lineprops_changed (self , item ):
10111008 'update the widgets from the active line'
10121009 if not self ._inited : return
0 commit comments