Skip to content

Commit

Permalink
fixup! wrap GeneratorModel methods into BoundMethod; remove redundant…
Browse files Browse the repository at this point in the history
… test
  • Loading branch information
temyurchenko committed Sep 25, 2024
1 parent 2cc378a commit ad5cdb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions astroid/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,14 @@ def __str__(self) -> str:
class AsyncGenerator(Generator):
"""Special node representing an async generator."""

def __init__(
self,
parent: nodes.FunctionDef,
generator_initial_context: InferenceContext | None = None,
) -> None:
super().__init__(parent, generator_initial_context)
AsyncGenerator.special_attributes = objectmodel.AsyncGeneratorModel()

Check warning on line 727 in astroid/bases.py

View check run for this annotation

Codecov / codecov/patch

astroid/bases.py#L726-L727

Added lines #L726 - L727 were not covered by tests

def pytype(self) -> Literal["builtins.async_generator"]:
return "builtins.async_generator"

Expand Down

0 comments on commit ad5cdb9

Please sign in to comment.