Skip to content

Commit

Permalink
fix: Current module must not be available in its members' scope
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 27, 2022
1 parent eb328ad commit 54f9688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/griffe/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def resolve(self, name: str) -> str:
if self.parent is None:
# could be a built-in
raise NameResolutionError(f"{name} could not be resolved in the scope of {self.path}")
if name == self.parent.name:
if name == self.parent.name and not self.parent.is_module:
return self.parent.path
return self.parent.resolve(name)

Expand Down

0 comments on commit 54f9688

Please sign in to comment.