mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
fix problems with empty decorators - just '@' and nothing else
This commit is contained in:
@@ -655,6 +655,7 @@ class Parser(object):
|
|||||||
# decorator
|
# decorator
|
||||||
elif tok == '@':
|
elif tok == '@':
|
||||||
stmt, tok = self._parse_statement()
|
stmt, tok = self._parse_statement()
|
||||||
|
if stmt is not None:
|
||||||
self._decorators.append(stmt)
|
self._decorators.append(stmt)
|
||||||
elif tok == 'pass':
|
elif tok == 'pass':
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user