File tree 3 files changed +6
-0
lines changed 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ Bug Fixes
11
11
12
12
* D401: Fixed a false positive where one stem had multiple imperative forms,
13
13
e.g., init and initialize / initiate (#382).
14
+ * Fix parser hanging when there's a comment directly after ``__all__ ``
15
+ (#391, #366).
14
16
15
17
4.0.0 - July 6th, 2019
16
18
---------------------------
Original file line number Diff line number Diff line change @@ -487,6 +487,7 @@ def parse_dunder_all(self):
487
487
self .dunder_all = None
488
488
self .dunder_all_error = 'Could not evaluate contents of __all__. '
489
489
return
490
+ self .stream .move ()
490
491
491
492
def parse_module (self ):
492
493
"""Parse a module (and its children) and return a Module object."""
Original file line number Diff line number Diff line change @@ -551,6 +551,9 @@ def nested_3(self):
551
551
__all__ = 'foo', 'bar'
552
552
foo = 1
553
553
""" ),
554
+ CodeSnippet ("""\
555
+ __all__ = ['foo', 'bar'] # never freeze
556
+ """ ),
554
557
))
555
558
def test_dunder_all (code ):
556
559
"""Test that __all__ is parsed correctly."""
You can’t perform that action at this time.
0 commit comments