| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…k in subclasses, only allowed to override `object.__hash__`
|
Sorry, something went wrong.
…-dunder-hash-consistently
|
Diff from mypy_primer, showing the effect of this PR on open source code: beartype (https://github.com/beartype/beartype)
+ beartype/_check/metadata/metadecor.py:289: error: Unused "type: ignore" comment [unused-ignore]
+ beartype/_check/metadata/metacheck.py:97: error: Unused "type: ignore" comment [unused-ignore]
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ bson/regex.py:112: error: Unused "type: ignore" comment [unused-ignore]
prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/_internal/concurrency/calls.py:273: error: Unused "type: ignore" comment [unused-ignore]
colour (https://github.com/colour-science/colour)
- colour/utilities/structures.py:515: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- colour/io/luts/sequence.py:266: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- colour/io/luts/operator.py:411: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- colour/io/luts/lut.py:354: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
asynq (https://github.com/quora/asynq)
+ asynq/tests/test_tools.py:183: error: Unused "type: ignore" comment [unused-ignore]
pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/python_api.py:88: error: Unused "type: ignore" comment [unused-ignore]
+ src/_pytest/_code/source.py:50: error: Unused "type: ignore" comment [unused-ignore]
+ src/_pytest/_code/code.py:77: error: Unused "type: ignore" comment [unused-ignore]
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/arrays/base.py:2207: error: Unused "type: ignore" comment [unused-ignore]
+ pandas/core/generic.py:1868: error: Unused "type: ignore" comment [unused-ignore]
+ pandas/core/indexes/base.py:5204: error: Unused "type: ignore" comment [unused-ignore]
werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/datastructures/structures.py:648: error: Unused "type: ignore" comment [unused-ignore]
+ src/werkzeug/datastructures/headers.py:108: error: Unused "type: ignore" comment [unused-ignore]
+ src/werkzeug/routing/rules.py:912: error: Unused "type: ignore" comment [unused-ignore]
jax (https://github.com/google/jax)
+ jax/_src/core.py:535: error: Unused "type: ignore" comment [unused-ignore]
+ jax/_src/core.py:875: error: Unused "type: ignore" comment [unused-ignore]
+ jax/_src/earray.py:33: error: Unused "type: ignore" comment [unused-ignore]
+ jax/_src/prng.py:301: error: Unused "type: ignore" comment [unused-ignore]
+ jax/experimental/sparse/_base.py:34: error: Unused "type: ignore" comment [unused-ignore]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/core/generic.pyi:67: error: Unused "type: ignore" comment [unused-ignore]
+ pandas-stubs/core/frame.pyi:375: error: Unused "type: ignore" comment [unused-ignore]
+ pandas-stubs/core/indexes/base.pyi:75: error: Unused "type: ignore" comment [unused-ignore]
+ pandas-stubs/core/groupby/generic.pyi:209: error: Return type "Iterator[tuple[ByT, Series[S2]]]" of "__iter__" incompatible with return type "Iterator[tuple[Hashable, Series[S2]]]" in supertype "pandas.core.groupby.groupby.BaseGroupBy" [override]
+ pandas-stubs/core/groupby/generic.pyi:449: error: Return type "Iterator[tuple[ByT, DataFrame]]" of "__iter__" incompatible with return type "Iterator[tuple[Hashable, DataFrame]]" in supertype "pandas.core.groupby.groupby.BaseGroupBy" [override]
ibis (https://github.com/ibis-project/ibis)
- ibis/common/bases.py:167: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- ibis/common/bases.py:205: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- ibis/common/bases.py:249: error: Signature of "__hash__" incompatible with supertype "Slotted" [override]
- ibis/common/bases.py:249: note: Superclass:
- ibis/common/bases.py:249: note: None
- ibis/common/bases.py:249: note: Subclass:
- ibis/common/bases.py:249: note: def __hash__(self) -> int
- ibis/common/collections.py:153: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- ibis/common/collections.py:291: error: Signature of "__hash__" incompatible with supertype "Mapping" [override]
- ibis/common/collections.py:291: note: Superclass:
- ibis/common/collections.py:291: note: None
- ibis/common/collections.py:291: note: Subclass:
- ibis/common/collections.py:291: note: def __hash__(self) -> int
- ibis/common/collections.py:313: note: Superclass:
- ibis/common/collections.py:313: note: None
- ibis/common/collections.py:313: note: Subclass:
- ibis/common/collections.py:313: note: def __hash__(self) -> int
- ibis/common/collections.py:313: error: Signature of "__hash__" incompatible with supertype "Mapping" [override]
- ibis/common/deferred.py:180: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- ibis/common/patterns.py:660: error: Signature of "__hash__" incompatible with supertype "Slotted" [override]
- ibis/common/patterns.py:660: note: Superclass:
- ibis/common/patterns.py:660: note: None
- ibis/common/patterns.py:660: note: Subclass:
- ibis/common/patterns.py:660: note: def __hash__(self) -> int
- ibis/common/patterns.py:937: error: Signature of "__hash__" incompatible with supertype "Slotted" [override]
- ibis/common/patterns.py:937: note: Superclass:
- ibis/common/patterns.py:937: note: None
- ibis/common/patterns.py:937: note: Subclass:
- ibis/common/patterns.py:937: note: def __hash__(self) -> int
- ibis/common/grounds.py:164: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- ibis/common/grounds.py:220: error: Signature of "__hash__" incompatible with supertype "Comparable" [override]
- ibis/common/grounds.py:220: note: Superclass:
- ibis/common/grounds.py:220: note: None
- ibis/common/grounds.py:220: note: Subclass:
- ibis/common/grounds.py:220: note: def __hash__(self) -> int
- ibis/common/grounds.py:220: error: Signature of "__hash__" incompatible with supertype "Annotable" [override]
- ibis/common/grounds.py:220: note: Superclass:
- ibis/common/grounds.py:220: note: None
- ibis/common/grounds.py:220: note: Subclass:
- ibis/common/grounds.py:220: note: def __hash__(self) -> int
- ibis/common/egraph.py:124: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[], int]") [assignment]
- ibis/expr/datatypes/core.py:941: error: Definition of "__hash__" in base class "Concrete" is incompatible with definition in base class "Mapping" [misc]
- ibis/expr/schema.py:25: error: Definition of "__hash__" in base class "Concrete" is incompatible with definition in base class "Mapping" [misc]
- ibis/common/tests/test_grounds.py:142: error: Definition of "__hash__" in base class "Concrete" is incompatible with definition in base class "Mapping" [misc]
mkdocs (https://github.com/mkdocs/mkdocs)
+ mkdocs/utils/templates.py:47: error: Subclass of "ExtraScriptValue" and "str" cannot exist: would have incompatible method signatures [unreachable]
schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/jsonld_context.py: note: In function "pred":
+ schema_salad/jsonld_context.py:53:31: error: Subclass of "str" and "MutableMapping[Any, Any]" cannot exist: would have incompatible method signatures [unreachable]
+ schema_salad/jsonld_context.py:54:21: error: Statement is unreachable [unreachable]
+ schema_salad/schema.py: note: In function "get_anon_name":
+ schema_salad/schema.py:422:27: error: Subclass of "str" and "Mapping[Any, Any]" cannot exist: would have incompatible method signatures [unreachable]
+ schema_salad/schema.py:423:17: error: Statement is unreachable [unreachable]
static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/series.py:3346: error: Incompatible return value type (got "IndexBase", expected "TLabel | ndarray[Any, Any]") [return-value]
+ static_frame/core/frame.py:7056: error: Argument 1 to "index_from_optional_constructors" has incompatible type "TypeBlocks"; expected "TIndexInitializer" [arg-type]
+ static_frame/core/frame.py:7056: note: Following member(s) of "TypeBlocks" have conflicts:
+ static_frame/core/frame.py:7056: note: Expected:
+ static_frame/core/frame.py:7056: note: def __iter__(self) -> Iterator[TLabel]
+ static_frame/core/frame.py:7056: note: Got:
+ static_frame/core/frame.py:7056: note: def __iter__(self) -> Iterator[TypeBlocks]
+ static_frame/core/frame.py:7056: note: Following member(s) of "TypeBlocks" have conflicts:
+ static_frame/core/frame.py:7056: note: Expected:
+ static_frame/core/frame.py:7056: note: def __iter__(self) -> Iterator[Sequence[TLabel]]
+ static_frame/core/frame.py:7056: note: Got:
+ static_frame/core/frame.py:7056: note: def __iter__(self) -> Iterator[TypeBlocks]
+ static_frame/core/frame.py:7298: error: Argument 1 to "index_from_optional_constructors" has incompatible type "TypeBlocks"; expected "TIndexInitializer" [arg-type]
+ static_frame/core/frame.py:7298: note: Following member(s) of "TypeBlocks" have conflicts:
+ static_frame/core/frame.py:7298: note: Expected:
+ static_frame/core/frame.py:7298: note: def __iter__(self) -> Iterator[TLabel]
+ static_frame/core/frame.py:7298: note: Got:
+ static_frame/core/frame.py:7298: note: def __iter__(self) -> Iterator[TypeBlocks]
+ static_frame/core/frame.py:7298: note: Following member(s) of "TypeBlocks" have conflicts:
+ static_frame/core/frame.py:7298: note: Expected:
+ static_frame/core/frame.py:7298: note: def __iter__(self) -> Iterator[Sequence[TLabel]]
+ static_frame/core/frame.py:7298: note: Got:
+ static_frame/core/frame.py:7298: note: def __iter__(self) -> Iterator[TypeBlocks]
xarray (https://github.com/pydata/xarray)
+ xarray/core/_typed_ops.py:93: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/_typed_ops.py:362: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/_typed_ops.py:736: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/_typed_ops.py:1164: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/_typed_ops.py:1376: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/_typed_ops.py:1502: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/dataset.py:1510: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/dataset.py: note: In class "Dataset":
+ xarray/core/dataset.py:1510: error: Cannot override instance variable (previously declared on base class "DatasetOpsMixin") with class variable [misc]
+ xarray/core/dataset.py:1510: note: Error code "misc" not covered by "type: ignore" comment
+ xarray/core/dataset.py: note: At top level:
+ xarray/core/dataarray.py:1364: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/core/dataarray.py: note: In member "rename" of class "DataArray":
+ xarray/core/dataarray.py:2601: error: Argument "name" to "_replace" of "DataArray" has incompatible type "Hashable | Mapping[Any, Hashable]"; expected "Hashable | Default | None" [arg-type]
+ xarray/core/dataarray.py: note: At top level:
+ xarray/core/datatree.py:303: error: Unused "type: ignore" comment [unused-ignore]
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #4266. Fixes #18622. Refs #2455.
This is the first step towards checking hashability of dict keys (and Hashable compatibility in general). This PR implements the following rules:
Refs #19043.