Narrow type variable bounds in binder by ilevkivskyi · Pull Request #19183 · python/mypy (original) (raw)
Diff from mypy_primer, showing the effect of this PR on open source code:
PyGithub (https://github.com/PyGithub/PyGithub)
- github/MainClass.py:988: error: Unused "type: ignore" comment [unused-ignore]
antidote (https://github.com/Finistere/antidote): 1.47x slower (65.5s -> 96.3s in single noisy sample)
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/states.py:369: error: Argument 1 to "StateGroup" has incompatible type "Collection[Union[State[Any], Any]]"; expected "list[State[Any]]" [arg-type]
- src/prefect/states.py:369: error: Argument 1 to "StateGroup" has incompatible type "Collection[Never]"; expected "list[State[Any]]" [arg-type]
- src/prefect/futures.py:222: note: def result(self, raise_on_failure: Literal[True] = ..., retry_result_failure: bool = ...) -> Any
- src/prefect/futures.py:222: note: def result(self, raise_on_failure: Literal[False] = ..., retry_result_failure: bool = ...) -> Union[Any, Exception]
- src/prefect/futures.py:222: note: def result(self, raise_on_failure: bool = ..., retry_result_failure: bool = ...) -> Union[Any, Exception]
- src/prefect/task_engine.py:467: error: Item "type" of "Union[ResultRecord[Any], type[NotSet]]" has no attribute "result" [union-attr]
- src/prefect/task_engine.py:467: error: Item "type" of "Union[R, type[NotSet]]" has no attribute "result" [union-attr]
- src/prefect/task_engine.py:1022: error: Item "type" of "Union[ResultRecord[Any], type[NotSet]]" has no attribute "result" [union-attr]
- src/prefect/task_engine.py:1022: error: Item "type" of "Union[R, type[NotSet]]" has no attribute "result" [union-attr]
- src/prefect/flow_runs.py:292: error: Item "type" of "Union[type[AutomaticRunInput[Never]], type[T]]" has no attribute "load" [union-attr]
- src/prefect/flow_runs.py:292: error: "type[T]" has no attribute "load" [attr-defined]
- src/prefect/flow_runs.py:307: error: Item "type" of "Union[type[AutomaticRunInput[Never]], type[T]]" has no attribute "save" [union-attr]
- src/prefect/flow_runs.py:307: error: "type[T]" has no attribute "save" [attr-defined]
- src/prefect/flow_runs.py:319: error: Item "type" of "Union[type[AutomaticRunInput[Never]], type[T]]" has no attribute "load" [union-attr]
- src/prefect/flow_runs.py:319: error: "type[T]" has no attribute "load" [attr-defined]
- src/prefect/flow_runs.py:446: error: Item "type" of "Union[type[AutomaticRunInput[Never]], type[T]]" has no attribute "load" [union-attr]
- src/prefect/flow_runs.py:446: error: "type[T]" has no attribute "load" [attr-defined]
- src/prefect/flow_runs.py:456: error: Item "type" of "Union[type[AutomaticRunInput[Never]], type[T]]" has no attribute "save" [union-attr]
- src/prefect/flow_runs.py:456: error: "type[T]" has no attribute "save" [attr-defined]
kopf (https://github.com/nolar/kopf)
- kopf/_cogs/structs/dicts.py:243: error: Unused "type: ignore" comment [unused-ignore]
- kopf/_core/intents/handlers.py:36: error: Redundant cast to "execution.CauseT" [redundant-cast]
python-chess (https://github.com/niklasf/python-chess)
- chess/pgn.py:1315: error: Returning Any from function declared to return "HeadersT" [no-any-return]
kornia (https://github.com/kornia/kornia)
- kornia/utils/helpers.py:387: error: Unused "type: ignore" comment [unused-ignore]
mypy (https://github.com/python/mypy)
- mypy/expandtype.py:125: error: Redundant cast to "F" [redundant-cast]
- mypy/expandtype.py:125: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-redundant-cast for more info
- mypy/typeops.py:421: error: Redundant cast to "F" [redundant-cast]
- mypy/typeops.py:430: error: Redundant cast to "F" [redundant-cast]
- mypy/typeops.py:469: error: Incompatible types in assignment (expression has type "CallableType", variable has type "F") [assignment]
- mypy/typeops.py:484: error: Redundant cast to "F" [redundant-cast]
- mypy/checkmember.py:1489: error: Redundant cast to "F" [redundant-cast]
- mypy/checkmember.py:1492: error: Redundant cast to "F" [redundant-cast]
- mypy/checkmember.py:1502: error: Redundant cast to "F" [redundant-cast]
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/third_party/beartype.py:128: error: Incompatible types in assignment (expression has type "_T", variable has type "type[Any]") [assignment]
- src/hydra_zen/third_party/beartype.py:128: error: Incompatible types in assignment (expression has type "_T", variable has type "_T") [assignment]
- src/hydra_zen/third_party/beartype.py:130: error: Redundant cast to "_T" [redundant-cast]
- src/hydra_zen/third_party/pydantic.py:111: error: Redundant cast to "_T" [redundant-cast]
- src/hydra_zen/third_party/pydantic.py:115: error: Redundant cast to "_T" [redundant-cast]
- src/hydra_zen/third_party/pydantic.py:123: error: Argument 1 has incompatible type "_T | type[object]"; expected "_T" [arg-type]
pytest (https://github.com/pytest-dev/pytest)
- src/_pytest/fixtures.py:1132: error: Returning Any from function declared to return "FixtureValue" [no-any-return]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/init.py:67: error: Unused "type: ignore" comment [unused-ignore]
- tests/init.py:85: error: Unused "type: ignore" comment [unused-ignore]
beartype (https://github.com/beartype/beartype)
- beartype/_decor/_type/decortype.py:133: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/_type/decortype.py:295: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/_nontype/decornontype.py:294: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/_nontype/decornontype.py:301: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/_nontype/decornontype.py:380: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/_nontype/decornontype.py:395: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/_nontype/decornontype.py:567: error: Unused "type: ignore" comment [unused-ignore]
- beartype/_decor/decorcore.py:133: error: Unused "type: ignore" comment [unused-ignore]
xarray (https://github.com/pydata/xarray)
- xarray/structure/alignment.py: note: In function "_broadcast_helper":
- xarray/structure/alignment.py:1140: error: Redundant cast to "T_Alignable" [redundant-cast]
- xarray/structure/alignment.py:1142: error: Redundant cast to "T_Alignable" [redundant-cast]
steam.py (https://github.com/Gobot1234/steam.py)
- steam/ext/commands/commands.py:284: error: Argument 1 to "append" of "list" has incompatible type "Command[Any, Any, Any]"; expected "Self" [arg-type]
- steam/ext/commands/cog.py:182: error: Argument 1 to "decorator" has incompatible type "Callable[[Any | None, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"; expected "F" [arg-type]
- steam/ext/commands/bot.py:415: error: Argument 1 to "decorator" has incompatible type "Callable[..., Coroutine[Any, Any, Any]]"; expected "F" [arg-type]