Skip to content

Commit acafbd8

Browse files
authored
refactor: Allow ExprName.parent to be of type griffe.Function
Issue-391: #391 PR-395: #395
1 parent 1301839 commit acafbd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_griffe/expressions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from collections.abc import Iterable, Iterator, Sequence
2424
from pathlib import Path
2525

26-
from _griffe.models import Class, Module
26+
from _griffe.models import Class, Function, Module
2727

2828

2929
def _yield(element: str | Expr | tuple[str | Expr, ...], *, flat: bool = True) -> Iterator[str | Expr]:
@@ -599,7 +599,7 @@ class ExprName(Expr): # noqa: PLW1641
599599

600600
name: str
601601
"""Actual name."""
602-
parent: str | ExprName | Module | Class | None = None
602+
parent: str | ExprName | Module | Class | Function | None = None
603603
"""Parent (for resolution in its scope)."""
604604

605605
def __eq__(self, other: object) -> bool:

0 commit comments

Comments
 (0)