Skip to content

Generate dataclasses __hash__ according to runtime semantics #19043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sterliakov
Copy link
Collaborator

Fixes #18962

This comment has been minimized.

Copy link
Contributor

github-actions bot commented May 6, 2025

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_model_construction.py:510: error: Cannot assign to a method  [method-assign]

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/types/base.py:247: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ strawberry/types/scalar.py:37: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]

steam.py (https://github.com/Gobot1234/steam.py)
+ steam/reaction.py:204: error: Signature of "__hash__" incompatible with supertype "PartialMessageReaction"  [override]
+ steam/reaction.py:204: note:      Superclass:
+ steam/reaction.py:204: note:          None
+ steam/reaction.py:204: note:      Subclass:
+ steam/reaction.py:204: note:          def __hash__(self) -> int
+ steam/manifest.py:659: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ steam/chat.py:368: error: Signature of "__hash__" incompatible with supertype "Channel"  [override]
+ steam/chat.py:368: note:      Superclass:
+ steam/chat.py:368: note:          None
+ steam/chat.py:368: note:      Subclass:
+ steam/chat.py:368: note:          def __hash__(self) -> int
+ steam/chat.py:368: note:      Superclass:
+ steam/chat.py:368: note:          None
+ steam/chat.py:368: note:      Subclass:
+ steam/chat.py:368: note:          def __hash__(self) -> int
+ steam/channel.py:51: error: Signature of "__hash__" incompatible with supertype "Channel"  [override]
+ steam/channel.py:51: note:      Superclass:
+ steam/channel.py:51: note:          None
+ steam/channel.py:51: note:      Subclass:
+ steam/channel.py:51: note:          def __hash__(self) -> int
+ steam/ext/csgo/backpack.py:273: error: Definition of "__hash__" in base class "Asset" is incompatible with definition in base class "_BaseInspectedItem"  [misc]

schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/engine/events.py: note: In member "__hash__" of class "NonFatalError":
+ src/schemathesis/engine/events.py:216: error: Signature of "__hash__" incompatible with supertype "EngineEvent"  [override]
+ src/schemathesis/engine/events.py:216: note:      Superclass:
+ src/schemathesis/engine/events.py:216: note:          None
+ src/schemathesis/engine/events.py:216: note:      Subclass:
+ src/schemathesis/engine/events.py:216: note:          def __hash__(self) -> int

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/mparser.py:264: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:264: note:      Superclass:
+ mesonbuild/mparser.py:264: note:          None
+ mesonbuild/mparser.py:264: note:      Subclass:
+ mesonbuild/mparser.py:264: note:          def __hash__() -> int
+ mesonbuild/mparser.py:279: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:279: note:      Superclass:
+ mesonbuild/mparser.py:279: note:          None
+ mesonbuild/mparser.py:279: note:      Subclass:
+ mesonbuild/mparser.py:279: note:          def __hash__() -> int
+ mesonbuild/mparser.py:296: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:296: note:      Superclass:
+ mesonbuild/mparser.py:296: note:          None
+ mesonbuild/mparser.py:296: note:      Subclass:
+ mesonbuild/mparser.py:296: note:          def __hash__() -> int
+ mesonbuild/mparser.py:307: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:307: note:      Superclass:
+ mesonbuild/mparser.py:307: note:          None
+ mesonbuild/mparser.py:307: note:      Subclass:
+ mesonbuild/mparser.py:307: note:          def __hash__() -> int
+ mesonbuild/mparser.py:336: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:336: note:      Superclass:
+ mesonbuild/mparser.py:336: note:          None
+ mesonbuild/mparser.py:336: note:      Subclass:
+ mesonbuild/mparser.py:336: note:          def __hash__() -> int
+ mesonbuild/mparser.py:388: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:388: note:      Superclass:
+ mesonbuild/mparser.py:388: note:          None
+ mesonbuild/mparser.py:388: note:      Subclass:
+ mesonbuild/mparser.py:388: note:          def __hash__() -> int
+ mesonbuild/mparser.py:401: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:401: note:      Superclass:
+ mesonbuild/mparser.py:401: note:          None
+ mesonbuild/mparser.py:401: note:      Subclass:
+ mesonbuild/mparser.py:401: note:          def __hash__() -> int
+ mesonbuild/mparser.py:417: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:417: note:      Superclass:
+ mesonbuild/mparser.py:417: note:          None
+ mesonbuild/mparser.py:417: note:      Subclass:
+ mesonbuild/mparser.py:417: note:          def __hash__() -> int
+ mesonbuild/mparser.py:436: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:436: note:      Superclass:
+ mesonbuild/mparser.py:436: note:          None
+ mesonbuild/mparser.py:436: note:      Subclass:
+ mesonbuild/mparser.py:436: note:          def __hash__() -> int
+ mesonbuild/mparser.py:445: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:445: note:      Superclass:
+ mesonbuild/mparser.py:445: note:          None
+ mesonbuild/mparser.py:445: note:      Subclass:
+ mesonbuild/mparser.py:445: note:          def __hash__() -> int
+ mesonbuild/mparser.py:455: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:455: note:      Superclass:
+ mesonbuild/mparser.py:455: note:          None
+ mesonbuild/mparser.py:455: note:      Subclass:
+ mesonbuild/mparser.py:455: note:          def __hash__() -> int
+ mesonbuild/mparser.py:472: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:472: note:      Superclass:
+ mesonbuild/mparser.py:472: note:          None
+ mesonbuild/mparser.py:472: note:      Subclass:
+ mesonbuild/mparser.py:472: note:          def __hash__() -> int
+ mesonbuild/mparser.py:491: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:491: note:      Superclass:
+ mesonbuild/mparser.py:491: note:          None
+ mesonbuild/mparser.py:491: note:      Subclass:
+ mesonbuild/mparser.py:491: note:          def __hash__() -> int
+ mesonbuild/mparser.py:506: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:506: note:      Superclass:
+ mesonbuild/mparser.py:506: note:          None
+ mesonbuild/mparser.py:506: note:      Subclass:
+ mesonbuild/mparser.py:506: note:          def __hash__() -> int
+ mesonbuild/mparser.py:525: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:525: note:      Superclass:
+ mesonbuild/mparser.py:525: note:          None
+ mesonbuild/mparser.py:525: note:      Subclass:
+ mesonbuild/mparser.py:525: note:          def __hash__() -> int
+ mesonbuild/mparser.py:540: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:540: note:      Superclass:
+ mesonbuild/mparser.py:540: note:          None
+ mesonbuild/mparser.py:540: note:      Subclass:
+ mesonbuild/mparser.py:540: note:          def __hash__() -> int
+ mesonbuild/mparser.py:556: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:556: note:      Superclass:
+ mesonbuild/mparser.py:556: note:          None
+ mesonbuild/mparser.py:556: note:      Subclass:
+ mesonbuild/mparser.py:556: note:          def __hash__() -> int
+ mesonbuild/mparser.py:578: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:578: note:      Superclass:
+ mesonbuild/mparser.py:578: note:          None
+ mesonbuild/mparser.py:578: note:      Subclass:
+ mesonbuild/mparser.py:578: note:          def __hash__() -> int
+ mesonbuild/mparser.py:591: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:591: note:      Superclass:
+ mesonbuild/mparser.py:591: note:          None
+ mesonbuild/mparser.py:591: note:      Subclass:
+ mesonbuild/mparser.py:591: note:          def __hash__() -> int
+ mesonbuild/mparser.py:602: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:602: note:      Superclass:
+ mesonbuild/mparser.py:602: note:          None
+ mesonbuild/mparser.py:602: note:      Subclass:
+ mesonbuild/mparser.py:602: note:          def __hash__() -> int
+ mesonbuild/mparser.py:614: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:614: note:      Superclass:
+ mesonbuild/mparser.py:614: note:          None
+ mesonbuild/mparser.py:614: note:      Subclass:
+ mesonbuild/mparser.py:614: note:          def __hash__() -> int
+ mesonbuild/mparser.py:629: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:629: note:      Superclass:
+ mesonbuild/mparser.py:629: note:          None
+ mesonbuild/mparser.py:629: note:      Subclass:
+ mesonbuild/mparser.py:629: note:          def __hash__() -> int
+ mesonbuild/mparser.py:647: error: Signature of "__hash__" incompatible with supertype "BaseNode"  [override]
+ mesonbuild/mparser.py:647: note:      Superclass:
+ mesonbuild/mparser.py:647: note:          None
+ mesonbuild/mparser.py:647: note:      Subclass:
+ mesonbuild/mparser.py:647: note:          def __hash__() -> int
+ mesonbuild/backend/backends.py:310:49: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | BuildTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:319:53: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:357:45: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "SharedLibrary"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:359:45: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "StaticLibrary"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:363:45: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:366:49: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Executable"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:384:89: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Target"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:385:89: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Target"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:390:42: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Target"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:413:53: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:505:53: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "ExtractedObjects"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:811:83: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "SharedLibrary | StaticLibrary"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:825:80: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:902:54: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:902:69: error: Argument 2 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | CustomTargetIndex | GeneratedList"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1186:54: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "SharedLibrary | StaticLibrary"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1213:89: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget | CustomTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1218:57: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1324:42: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Target | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1466:62: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1475:77: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1531:36: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Target | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1804:75: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "SharedLibrary | Executable"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1817:62: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1837:66: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:1849:62: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/backend/backends.py:2029:87: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/interpreter/interpreterobjects.py:961:56: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "BuildTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/modules/windows.py:122:124: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget"; expected "Hashable"  [arg-type]
+ mesonbuild/modules/gnome.py:628:99: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "SharedLibrary"; expected "Hashable"  [arg-type]
+ mesonbuild/modules/gnome.py:948:86: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/modules/gnome.py:1517:84: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]
+ mesonbuild/modules/_qt.py:754:92: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "CustomTarget | CustomTargetIndex"; expected "Hashable"  [arg-type]

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/datatypes/core.py:160: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/selectors.py:36: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/schema.py:25: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/rules.py:141: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/operations/core.py:21: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/operations/relations.py:391: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/rewrites.py:29: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/rewrites.py:58: error: Type argument "Value[Any, Any]" of "FrozenDict" must be a subtype of "Hashable"  [type-var]
+ ibis/expr/rewrites.py:61: error: Type argument "Value[Any, Any]" of "FrozenDict" must be a subtype of "Hashable"  [type-var]
+ ibis/selectors.py:432: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/selectors.py:529: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/selectors.py:639: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/builders.py:23: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/examples/__init__.py:20: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/examples/__init__.py:86: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/api.py:2246: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/types/temporal_windows.py:20: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/expr/types/groupby.py:37: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds_benchmarks.py:12: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_graph_benchmarks.py:15: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_graph.py:208: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_graph.py:214: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_graph.py:217: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_graph.py:220: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_graph.py:246: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_egraph.py:123: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_egraph.py:158: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_egraph.py:175: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_egraph.py:191: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_egraph.py:195: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_egraph.py:211: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:81: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:91: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:95: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:99: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:109: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:142: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:196: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:631: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:648: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:1047: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ibis/common/tests/test_grounds.py:1050: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]

jax (https://github.com/google/jax)
+ jax/_src/pallas/mosaic/core.py:154: error: Signature of "__hash__" incompatible with supertype "GridSpec"  [override]
+ jax/_src/pallas/mosaic/core.py:154: note:      Superclass:
+ jax/_src/pallas/mosaic/core.py:154: note:          None
+ jax/_src/pallas/mosaic/core.py:154: note:      Subclass:
+ jax/_src/pallas/mosaic/core.py:154: note:          def __hash__() -> int

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/debugging/_probe/model.py:203: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:208: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:260: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:266: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:277: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:305: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:310: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:321: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ ddtrace/debugging/_probe/model.py:326: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/connection.py:174: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]
+ mitmproxy/connection.py:262: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]

pytest (https://github.com/pytest-dev/pytest)
+ testing/python/metafunc.py:49: error: Incompatible override of '__hash__': dataclasses without 'frozen' or 'unsafe_hash' have '__hash__' set to None  [misc]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dataclasses with generated __hash__ subclassing Hashable are considered abstract
1 participant