Skip to content

Commit ad5cdb9

Browse files
committed
fixup! wrap GeneratorModel methods into BoundMethod; remove redundant test
1 parent 2cc378a commit ad5cdb9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

astroid/bases.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,14 @@ def __str__(self) -> str:
718718
class AsyncGenerator(Generator):
719719
"""Special node representing an async generator."""
720720

721+
def __init__(
722+
self,
723+
parent: nodes.FunctionDef,
724+
generator_initial_context: InferenceContext | None = None,
725+
) -> None:
726+
super().__init__(parent, generator_initial_context)
727+
AsyncGenerator.special_attributes = objectmodel.AsyncGeneratorModel()
728+
721729
def pytype(self) -> Literal["builtins.async_generator"]:
722730
return "builtins.async_generator"
723731

0 commit comments

Comments
 (0)