Skip to content

Use checkmember.py to check method override #18870

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

Merged
merged 4 commits into from
Apr 2, 2025

Conversation

ilevkivskyi
Copy link
Member

This is a second "large" PR towards #7724. Here I actually expect a smaller fallout than for variables, since methods are usually less tricky, but let's see.

This comment has been minimized.

@ilevkivskyi
Copy link
Member Author

OK, so essentially as I predicted. We have a small bunch of improvements, but also we have some potential fasle positives in scipy-stubs (they look big, but it is only because we format a lot of overloads). I actually expected this problem: "restricted" self-types are really tricky even to reason about in terms of overrides, not to say about implementation. I am not sure what to do with this, maybe we can just live with this, and instruct people to use type ignores.

@ilevkivskyi
Copy link
Member Author

Hm, actually at least some of the errors in scipy-stubs may be "real". It looks like few of those I checked may be because mypy considers tuple[int, ...] not a subtype of tuple[int, *tuple[int, ...]].

@ilevkivskyi
Copy link
Member Author

Anyway, I spent some time thinking about this, and scipy-stubs stuff is way too tricky. Maybe we can special-case it somehow later. @JukkaL if don't have objections, I would propose to go ahead.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we can move forward.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Apr 2, 2025

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

mkdocs (https://github.com/mkdocs/mkdocs)
+ mkdocs/structure/pages.py:228: error: Unused "type: ignore" comment  [unused-ignore]

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ scipy-stubs/stats/_probability_distribution.pyi:248: error: Signature of "moment" incompatible with supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:      Superclass:
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool], kind: Literal['raw'], *, method: Literal['formula', 'transform', 'quadrature', 'cache'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool], kind: Literal['central'], *, method: Literal['formula', 'transform', 'quadrature', 'cache', 'normalize'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool], kind: Literal['standardized'], *, method: Literal['formula', 'transform', 'general', 'cache', 'normalize'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:      Subclass:
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool] = ..., kind: Literal['raw'] = ..., *, method: Literal['formula', 'transform', 'quadrature', 'cache'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool], kind: Literal['central'], *, method: Literal['formula', 'transform', 'quadrature', 'cache', 'normalize'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool] = ..., *, kind: Literal['central'], method: Literal['formula', 'transform', 'quadrature', 'cache', 'normalize'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool], kind: Literal['standardized'], *, method: Literal['formula', 'transform', 'general', 'cache', 'normalize'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          @overload
+ scipy-stubs/stats/_probability_distribution.pyi:248: note:          def moment(self, order: int | integer[Any] | numpy.bool[builtins.bool] = ..., *, kind: Literal['standardized'], method: Literal['formula', 'transform', 'general', 'cache', 'normalize'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:305: error: Return type "ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" of "entropy" incompatible with return type "float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" in supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:311: error: Return type "ndarray[_ShapeT0_co, dtype[complex128 | complexfloating[_64Bit | _96Bit | _128Bit, _64Bit | _96Bit | _128Bit]]]" of "logentropy" incompatible with return type "complex128 | complexfloating[_64Bit | _96Bit | _128Bit, _64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[complex128 | complexfloating[_64Bit | _96Bit | _128Bit, _64Bit | _96Bit | _128Bit]]]" in supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:319: error: Argument 1 of "pdf" is incompatible with supertype "_ProbabilityDistribution"; supertype defines the argument type as "float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:319: note: This violates the Liskov substitution principle
+ scipy-stubs/stats/_probability_distribution.pyi:319: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
+ scipy-stubs/stats/_probability_distribution.pyi:319: error: Return type "ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" of "pdf" incompatible with return type "float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" in supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:355: error: Argument 1 of "logpdf" is incompatible with supertype "_ProbabilityDistribution"; supertype defines the argument type as "float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:355: note: This violates the Liskov substitution principle
+ scipy-stubs/stats/_probability_distribution.pyi:355: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
+ scipy-stubs/stats/_probability_distribution.pyi:355: error: Return type "ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" of "logpdf" incompatible with return type "float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" in supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:392: error: Signature of "cdf" incompatible with supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:392: note:      Superclass:
+ scipy-stubs/stats/_probability_distribution.pyi:392: note:          def cdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None, /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'subtraction'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:392: note:      Subclass:
+ scipy-stubs/stats/_probability_distribution.pyi:392: note:          def cdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'subtraction'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:540: error: Signature of "logcdf" incompatible with supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:540: note:      Superclass:
+ scipy-stubs/stats/_probability_distribution.pyi:540: note:          def logcdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None, /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'subtraction'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:540: note:      Subclass:
+ scipy-stubs/stats/_probability_distribution.pyi:540: note:          def logcdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'subtraction'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:688: error: Signature of "ccdf" incompatible with supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:688: note:      Superclass:
+ scipy-stubs/stats/_probability_distribution.pyi:688: note:          def ccdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None, /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'addition'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:688: note:      Subclass:
+ scipy-stubs/stats/_probability_distribution.pyi:688: note:          def ccdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'addition'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:836: error: Signature of "logccdf" incompatible with supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:836: note:      Superclass:
+ scipy-stubs/stats/_probability_distribution.pyi:836: note:          def logccdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None, /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'addition'] | None) -> float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:836: note:      Subclass:
+ scipy-stubs/stats/_probability_distribution.pyi:836: note:          def logccdf(self, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., /, *, method: Literal['formula', 'logexp', 'complement', 'quadrature', 'addition'] | None = ...) -> ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]
+ scipy-stubs/stats/_probability_distribution.pyi:984: error: Argument 1 of "icdf" is incompatible with supertype "_ProbabilityDistribution"; supertype defines the argument type as "float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:984: note: This violates the Liskov substitution principle
+ scipy-stubs/stats/_probability_distribution.pyi:984: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
+ scipy-stubs/stats/_probability_distribution.pyi:984: error: Return type "ndarray[_ShapeT0_co, dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" of "icdf" incompatible with return type "float64 | floating[_64Bit | _96Bit | _128Bit] | ndarray[tuple[int, *tuple[int, ...]], dtype[float64 | floating[_64Bit | _96Bit | _128Bit]]]" in supertype "_ProbabilityDistribution"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:1019: error: Argument 1 of "ilogcdf" is incompatible with supertype "_ProbabilityDistribution"; supertype defines the argument type as "float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | SequenceND[CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool], tuple[int, ...]] | float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | CanArray0D[floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]"  [override]
+ scipy-stubs/stats/_probability_distribution.pyi:1019: note: This violates the Liskov substitution principle
+ scipy-stubs/stats/_probability_distribution.pyi:1019: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

... (truncated 9 lines) ...

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/task_runners.py:244: note:          def [P`-1, R] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectConcurrentFuture[R]
+ src/prefect/task_runners.py:244: note:          def [P`6954, R] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectConcurrentFuture[R]
- src/prefect/task_runners.py:244: note:          def [P`-1] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectConcurrentFuture[R]
+ src/prefect/task_runners.py:244: note:          def [P`6953] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectConcurrentFuture[R]
- src/prefect/task_runners.py:329: note:          def [P`-1, R] map(self, task: Task[P, R], parameters: dict[str, Union[Any, unmapped, allow_failure]], wait_for: Optional[Iterable[PrefectFuture[R]]] = ...) -> PrefectFutureList[PrefectConcurrentFuture[R]]
+ src/prefect/task_runners.py:329: note:          def [P`6962, R] map(self, task: Task[P, R], parameters: dict[str, Union[Any, unmapped, allow_failure]], wait_for: Optional[Iterable[PrefectFuture[R]]] = ...) -> PrefectFutureList[PrefectConcurrentFuture[R]]
- src/prefect/task_runners.py:329: note:          def [P`-1] map(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ...) -> PrefectFutureList[PrefectConcurrentFuture[R]]
+ src/prefect/task_runners.py:329: note:          def [P`6961] map(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ...) -> PrefectFutureList[PrefectConcurrentFuture[R]]
- src/prefect/task_runners.py:391: note:          def [P`-1, R] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectDistributedFuture[R]
+ src/prefect/task_runners.py:391: note:          def [P`6974, R] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectDistributedFuture[R]
- src/prefect/task_runners.py:391: note:          def [P`-1] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectDistributedFuture[R]
+ src/prefect/task_runners.py:391: note:          def [P`6973] submit(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ..., dependencies: Optional[dict[str, set[TaskRunInput]]] = ...) -> PrefectDistributedFuture[R]
- src/prefect/task_runners.py:446: note:          def [P`-1, R] map(self, task: Task[P, R], parameters: dict[str, Union[Any, unmapped, allow_failure]], wait_for: Optional[Iterable[PrefectFuture[R]]] = ...) -> PrefectFutureList[PrefectDistributedFuture[R]]
+ src/prefect/task_runners.py:446: note:          def [P`6982, R] map(self, task: Task[P, R], parameters: dict[str, Union[Any, unmapped, allow_failure]], wait_for: Optional[Iterable[PrefectFuture[R]]] = ...) -> PrefectFutureList[PrefectDistributedFuture[R]]
- src/prefect/task_runners.py:446: note:          def [P`-1] map(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ...) -> PrefectFutureList[PrefectDistributedFuture[R]]
+ src/prefect/task_runners.py:446: note:          def [P`6981] map(self, task: Task[P, Coroutine[Any, Any, R]], parameters: dict[str, Any], wait_for: Optional[Iterable[PrefectFuture[Any]]] = ...) -> PrefectFutureList[PrefectDistributedFuture[R]]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/arrays/boolean.py:372: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/series.py:4818: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/indexes/range.py:1382: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/indexes/multi.py:1802: error: Unused "type: ignore" comment  [unused-ignore]

steam.py (https://github.com/Gobot1234/steam.py)
- steam/ext/csgo/client.py:52: note:          cached_property[Client, steam._gc.client.ClientUser]
+ steam/ext/csgo/client.py:52: note:          steam._gc.client.ClientUser
- steam/ext/csgo/client.py:52: note:          cached_property[Client, steam.ext.csgo.models.ClientUser]
- steam/ext/csgo/client.py:52: note:      Superclass:
- steam/ext/csgo/client.py:52: note:          steam.user.ClientUser
+ steam/ext/csgo/client.py:52: note:          steam.ext.csgo.models.ClientUser
- steam/ext/csgo/client.py:52: note:      Subclass:
- steam/ext/csgo/client.py:52: note:          cached_property[Client, steam.ext.csgo.models.ClientUser]
- steam/ext/tf2/client.py:52: note:          cached_property[Client, steam._gc.client.ClientUser]
+ steam/ext/tf2/client.py:52: note:          steam._gc.client.ClientUser
- steam/ext/tf2/client.py:52: note:          cached_property[Client, steam.ext.tf2.client.ClientUser]
- steam/ext/tf2/client.py:52: note:      Superclass:
- steam/ext/tf2/client.py:52: note:          steam.user.ClientUser
+ steam/ext/tf2/client.py:52: note:          steam.ext.tf2.client.ClientUser
- steam/ext/tf2/client.py:52: note:      Subclass:
- steam/ext/tf2/client.py:52: note:          cached_property[Client, steam.ext.tf2.client.ClientUser]

xarray (https://github.com/pydata/xarray)
- xarray/core/variable.py:420: note:  override has type "T_DuckArray | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]")
+ xarray/core/variable.py:420: note:  override has type "T_DuckArray | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | int | float | complex | str | _NestedSequence[bool | int | float | complex | str | bytes]")

sympy (https://github.com/sympy/sympy)
+ sympy/functions/elementary/piecewise.py:813: error: "Expr" has no attribute "_eval_template_is_attr"  [attr-defined]
+ sympy/functions/elementary/piecewise.py:815: error: "Expr" has no attribute "_eval_template_is_attr"  [attr-defined]
+ sympy/printing/codeprinter.py:488: error: Incompatible types in assignment (expression has type "None", base class "StrPrinter" defined the type as "Callable[[Any], Any]")  [assignment]

setuptools (https://github.com/pypa/setuptools)
+ pkg_resources/__init__.py:1988: error: Unused "type: ignore" comment  [unused-ignore]

CPython (cases_generator) (https://github.com/python/cpython)
+ Tools/cases_generator/tier2_generator.py:94: error: Unused "type: ignore" comment  [unused-ignore]

tornado (https://github.com/tornadoweb/tornado)
- tornado/test/ioloop_test.py:558: note:          def [_P`-1, _T] submit(self, Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]
+ tornado/test/ioloop_test.py:558: note:          def [_P`5166, _T] submit(self, Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]

cki-lib (https://gitlab.com/cki-project/cki-lib)
- cki_lib/krb_ticket_refresher.py:26: error: Call to untyped function "_close_to_expire_ticket" of "RefreshKerberosTicket" in typed context  [no-untyped-call]

ibis (https://github.com/ibis-project/ibis)
- ibis/common/grounds.py:117: error: Signature of "__create__" incompatible with supertype "Abstract"  [override]
- ibis/common/grounds.py:117: note:      Superclass:
- ibis/common/grounds.py:117: note:          classmethod[Any, [VarArg(Any), KwArg(Any)], Any]
- ibis/common/grounds.py:117: note:      Subclass:
- ibis/common/grounds.py:117: note:          @classmethod
- ibis/common/grounds.py:117: note:          def __create__(cls, *args: Any, **kwargs: Any) -> Annotable

spack (https://github.com/spack/spack)
+ lib/spack/spack/build_systems/python.py:355: error: Unused "type: ignore" comment  [unused-ignore]
+ lib/spack/spack/build_systems/python.py:368: error: Unused "type: ignore" comment  [unused-ignore]

@ilevkivskyi ilevkivskyi merged commit b6a662c into python:master Apr 2, 2025
18 checks passed
@ilevkivskyi ilevkivskyi deleted the method-subtype-checkmember branch April 2, 2025 18:44
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.

3 participants