|
7 | 7 | from __future__ import annotations
|
8 | 8 |
|
9 | 9 | from dataclasses import dataclass, field
|
10 |
| -from functools import cached_property |
11 | 10 | from typing import TYPE_CHECKING, Literal, Protocol, TypeAlias, TypeVar, Union, runtime_checkable
|
12 | 11 |
|
13 | 12 | from typing_extensions import Self, assert_never
|
@@ -575,24 +574,24 @@ def __post_init__(self) -> None:
|
575 | 574 | msg = "Cannot bind type parameters to a non-class method callable."
|
576 | 575 | raise ValueError(msg)
|
577 | 576 |
|
578 |
| - def __hash__(self) -> int: |
579 |
| - return self._cached_hash |
580 |
| - |
581 |
| - @cached_property |
582 |
| - def _cached_hash(self) -> int: |
583 |
| - return hash((self.callable, self.args, self.bound_tp_params)) |
584 |
| - |
585 |
| - def __eq__(self, other: object) -> bool: |
586 |
| - # Override eq to use cached hash for perf |
587 |
| - if not isinstance(other, CallDecl): |
588 |
| - return False |
589 |
| - if hash(self) != hash(other): |
590 |
| - return False |
591 |
| - return ( |
592 |
| - self.callable == other.callable |
593 |
| - and self.args == other.args |
594 |
| - and self.bound_tp_params == other.bound_tp_params |
595 |
| - ) |
| 577 | + # def __hash__(self) -> int: |
| 578 | + # return self._cached_hash |
| 579 | + |
| 580 | + # @cached_property |
| 581 | + # def _cached_hash(self) -> int: |
| 582 | + # return hash((self.callable, self.args, self.bound_tp_params)) |
| 583 | + |
| 584 | + # def __eq__(self, other: object) -> bool: |
| 585 | + # # Override eq to use cached hash for perf |
| 586 | + # if not isinstance(other, CallDecl): |
| 587 | + # return False |
| 588 | + # if hash(self) != hash(other): |
| 589 | + # return False |
| 590 | + # return ( |
| 591 | + # self.callable == other.callable |
| 592 | + # and self.args == other.args |
| 593 | + # and self.bound_tp_params == other.bound_tp_params |
| 594 | + # ) |
596 | 595 |
|
597 | 596 |
|
598 | 597 | @dataclass(frozen=True)
|
|
0 commit comments