Let issubclass narrow Any by hauntsaninja · Pull Request #21165 · python/mypy

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

psycopg (https://github.com/psycopg/psycopg)
+ tests/types/test_composite.py:401: error: Too many arguments for "tuple"  [call-arg]

pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/config/__init__.py:2159: error: Redundant cast to "type[Warning]"  [redundant-cast]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/compat/pickle_compat.py:90: error: Incompatible types in assignment (expression has type "type[PeriodArray]", variable has type "type[BaseOffset]")  [assignment]
+ pandas/compat/pickle_compat.py:104: error: Too many arguments for "__new__" of "object"  [call-arg]
+ pandas/compat/pickle_compat.py:107: error: Too many arguments for "__new__" of "object"  [call-arg]
+ pandas/compat/pickle_compat.py:107: error: Incompatible types in assignment (expression has type "TimedeltaArray", variable has type "DatetimeArray")  [assignment]
+ pandas/compat/pickle_compat.py:109: error: Incompatible types in assignment (expression has type "BlockManager", variable has type "DatetimeArray")  [assignment]

pylint (https://github.com/pycqa/pylint)
+ pylint/lint/pylinter.py:97: error: Unused "type: ignore" comment  [unused-ignore]

poetry (https://github.com/python-poetry/poetry)
+ src/poetry/plugins/plugin_manager.py:106: error: Argument 1 to "_add_plugin" of "PluginManager" has incompatible type "Plugin | ApplicationPlugin"; expected "Plugin"  [arg-type]

mkdocs (https://github.com/mkdocs/mkdocs)
+ mkdocs/config/config_options.py:1156: error: Statement is unreachable  [unreachable]

static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/interface.py:1436: error: Incompatible types in assignment (expression has type "IndexHierarchy[*tuple[Any, ...]]", variable has type "TypeBlocks")  [assignment]
+ static_frame/core/interface.py:1438: error: Incompatible types in assignment (expression has type "IndexYearMonth | IndexYear | IndexDate", variable has type "TypeBlocks")  [assignment]
+ static_frame/core/interface.py:1440: error: Incompatible types in assignment (expression has type "Frame[Any, Any, *tuple[Any, ...]]", variable has type "TypeBlocks")  [assignment]