Skip to content

Commit

Permalink
fix: Fix comparing names and expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Nov 6, 2022
1 parent 44c01be commit 07bffff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/griffe/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def __init__(self, source: str, full: str | Callable) -> None:
self._full = ""
self._resolver = full

def __eq__(self, other: Name) -> bool: # type: ignore[override]
return self.source == other.source and self.full == other.full # noqa: WPS437
def __eq__(self, other: Name | Expression) -> bool: # type: ignore[override]
return self.full == other.full # noqa: WPS437

def __repr__(self) -> str:
return f"Name(source={self.source!r}, full={self.full!r})"
Expand Down

0 comments on commit 07bffff

Please sign in to comment.