mirror of
https://github.com/davidhalter/parso.git
synced 2026-03-03 05:47:15 +08:00
More small fixes regarding docstrings.
This commit is contained in:
@@ -230,7 +230,13 @@ class PEP8Normalizer(ErrorFinder):
|
||||
if child.type == 'simple_stmt':
|
||||
# Remove the newline.
|
||||
children = child.children[:-1]
|
||||
|
||||
found_docstring = False
|
||||
for c in children:
|
||||
if c.type == 'string' and not found_docstring:
|
||||
continue
|
||||
found_docstring = True
|
||||
|
||||
if c.type == 'expr_stmt' and \
|
||||
all(_is_magic_name(n) for n in c.get_defined_names()):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user