diff --git a/pyproject.toml b/pyproject.toml index 69c6c39..4ec43c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "maturin" name = "egglog" description = "e-graphs in Python built around the the egglog rust library" readme = "README.md" +dynamic = ["version"] license = { text = "MIT" } requires-python = ">=3.10" classifiers = [ diff --git a/python/egglog/declarations.py b/python/egglog/declarations.py index 86ad479..f55a599 100644 --- a/python/egglog/declarations.py +++ b/python/egglog/declarations.py @@ -573,7 +573,13 @@ def __eq__(self, other: object) -> bool: # Override eq to use cached hash for perf if not isinstance(other, CallDecl): return False - return hash(self) == hash(other) + if hash(self) != hash(other): + return False + return ( + self.callable == other.callable + and self.args == other.args + and self.bound_tp_params == other.bound_tp_params + ) @dataclass(frozen=True)