@@ -100,32 +100,32 @@ def save(docs, code):
100100
101101 for line in lines :
102102 process_as_code = False
103-
104103 # Only go into multiline comments section when one of the delimiters is
105104 # found to be at the start of a line
106- if multistart and multiend and \
107- any (line .lstrip ().startswith (delim ) or line .rstrip ().endswith (delim )
108- for delim in (multistart , multiend )):
105+ if multistart and multiend \
106+ and any (line .lstrip ().startswith (delim ) or line .rstrip ().endswith (delim )
107+ for delim in (multistart , multiend )):
109108 multi_line = not multi_line
110109
111- if ( multi_line
112- and line .strip ().endswith (multiend )
113- and len (line .strip ()) > len (multiend ) ):
110+ if multi_line \
111+ and line .strip ().endswith (multiend ) \
112+ and len (line .strip ()) > len (multiend ):
114113 multi_line = False
115114
116-
117- if (( not line . strip (). startswith ( multistart ) and not multi_line ) or multi_string ) :
115+ if not line . strip (). startswith ( multistart ) and not multi_line \
116+ or multi_string :
118117
119118 process_as_code = True
120119
121- if ( multi_string ) :
120+ if multi_string :
122121 multi_line = False
123122 multi_string = False
124123 else :
125124 multi_string = True
126125
127126 else :
128- # Get rid of the delimiters so that they aren't in the final docs
127+ # Get rid of the delimiters so that they aren't in the final
128+ # docs
129129 line = line .replace (multistart , '' )
130130 line = line .replace (multiend , '' )
131131 docs_text += line .strip () + '\n '
@@ -152,8 +152,7 @@ def save(docs, code):
152152 else :
153153 process_as_code = True
154154
155- if (process_as_code ):
156-
155+ if process_as_code :
157156 if code_text and any (line .lstrip ().startswith (x )
158157 for x in ['class ' , 'def ' , '@' ]):
159158 if not code_text .lstrip ().startswith ("@" ):
@@ -516,6 +515,7 @@ def monitor(sources, opts):
516515 for source in sources )
517516
518517 class RegenerateHandler (watchdog .events .FileSystemEventHandler ):
518+
519519 """A handler for recompiling files which triggered watchdog events"""
520520
521521 def on_modified (self , event ):
0 commit comments