mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-20 03:11:17 +08:00
Add a comment about using async funcdefs.
This commit is contained in:
@@ -25,6 +25,8 @@ class Context(object):
|
||||
self.parent_context = parent_context
|
||||
|
||||
def is_async_funcdef(self):
|
||||
# Stupidly enough async funcdefs can have two different forms,
|
||||
# depending if a decorator is used or not.
|
||||
return self.node.type == 'funcdef' \
|
||||
and self.node.parent.type in ('async_funcdef', 'async_stmt')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user