@@ -522,7 +522,7 @@ def __init__(self, parser, buf):
522522 self .parser = parser
523523 self .buf = buf
524524 self .pos = 0
525-
525+
526526 self .pen = Pen ()
527527 self .shapes = []
528528
@@ -616,7 +616,7 @@ def lookup_color(self, c):
616616 b = b * s
617617 a = 1.0
618618 return r , g , b , a
619-
619+
620620 sys .stderr .write ("warning: unknown color '%s'\n " % c )
621621 return None
622622
@@ -691,7 +691,7 @@ def parse(self):
691691 sys .exit (1 )
692692
693693 return self .shapes
694-
694+
695695 def transform (self , x , y ):
696696 return self .parser .transform (x , y )
697697
@@ -763,7 +763,7 @@ def __init__(self, msg=None, filename=None, line=None, col=None):
763763
764764 def __str__ (self ):
765765 return ':' .join ([str (part ) for part in (self .filename , self .line , self .col , self .msg ) if part != None ])
766-
766+
767767
768768class Scanner :
769769 """Stateless scanner."""
@@ -1007,7 +1007,7 @@ def filter(self, type, text):
10071007 text = text .replace ('\\ \r \n ' , '' )
10081008 text = text .replace ('\\ \r ' , '' )
10091009 text = text .replace ('\\ \n ' , '' )
1010-
1010+
10111011 # quotes
10121012 text = text .replace ('\\ "' , '"' )
10131013
@@ -1151,7 +1151,7 @@ class XDotParser(DotParser):
11511151 def __init__ (self , xdotcode ):
11521152 lexer = DotLexer (buf = xdotcode )
11531153 DotParser .__init__ (self , lexer )
1154-
1154+
11551155 self .nodes = []
11561156 self .edges = []
11571157 self .shapes = []
@@ -1188,7 +1188,7 @@ def handle_graph(self, attrs):
11881188 self .height = max (ymax - ymin , 1 )
11891189
11901190 self .top_graph = False
1191-
1191+
11921192 for attr in ("_draw_" , "_ldraw_" , "_hdraw_" , "_tdraw_" , "_hldraw_" , "_tldraw_" ):
11931193 if attr in attrs :
11941194 parser = XDotAttrParser (self , attrs [attr ])
@@ -1219,7 +1219,7 @@ def handle_edge(self, src_id, dst_id, attrs):
12191219 pos = attrs ['pos' ]
12201220 except KeyError :
12211221 return
1222-
1222+
12231223 points = self .parse_edge_pos (pos )
12241224 shapes = []
12251225 for attr in ("_draw_" , "_ldraw_" , "_hdraw_" , "_tdraw_" , "_hldraw_" , "_tldraw_" ):
@@ -1987,7 +1987,7 @@ def textentry_changed(self, widget, entry):
19871987 if not entry_text :
19881988 dot_widget .set_highlight (None )
19891989 return
1990-
1990+
19911991 found_items = self .find_text (entry_text )
19921992 dot_widget .set_highlight (found_items )
19931993
@@ -1997,7 +1997,7 @@ def textentry_activate(self, widget, entry):
19971997 if not entry_text :
19981998 dot_widget .set_highlight (None )
19991999 return ;
2000-
2000+
20012001 found_items = self .find_text (entry_text )
20022002 dot_widget .set_highlight (found_items )
20032003 if (len (found_items ) == 1 ):
@@ -2015,7 +2015,7 @@ def set_xdotcode(self, xdotcode, filename=None):
20152015 if self .widget .set_xdotcode (xdotcode ):
20162016 self .update_title (filename )
20172017 self .widget .zoom_to_fit ()
2018-
2018+
20192019 def update_title (self , filename = None ):
20202020 if filename is None :
20212021 self .set_title (self .base_title )
0 commit comments