[ty] Add a Todo-type branch for type[P] where P is a protocol class by AlexWaygood · Pull Request #19947 · astral-sh/ruff (original) (raw)
mypy_primer results
Changes were detected when running on open source projects
attrs (https://github.com/python-attrs/attrs)
- tests/test_annotations.py:48:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:49:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:50:36: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:78:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:79:52: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:93:37: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:122:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'C'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:124:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:126:50: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:127:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:129:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:130:33: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:132:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:134:42: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:415:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'C'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:517:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'C'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:519:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:520:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:521:36: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:539:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'C'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:541:56: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_annotations.py:547:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'D'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:549:37: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'D'> - tests/test_annotations.py:564:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:566:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:567:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:568:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:582:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:583:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:584:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:596:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:598:33: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:599:50: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:614:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:615:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'B'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:617:46: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:618:33: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'B'> - tests/test_annotations.py:620:46: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:621:33: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'B'> - tests/test_annotations.py:662:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:663:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'B'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:665:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:666:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'B'> - tests/test_annotations.py:678:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:680:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_annotations.py:682:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_annotations.py:684:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_converters.py:297:29: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:33:31: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:34:46: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:47:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:48:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:52:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:60:25: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:67:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:68:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:72:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:80:25: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:93:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:94:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:98:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:106:25: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:113:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:114:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:118:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_filters.py:126:25: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_forward_references.py:20:19: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument type<class 'A'>does not satisfy upper bound of type variable_A - tests/test_forward_references.py:22:19: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_functional.py:167:25: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C1'> - tests/test_functional.py:218:26: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], foundtype - tests/test_functional.py:545:42: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_functional.py:546:44: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_functional.py:547:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_functional.py:646:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_functional.py:647:35: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_hooks.py:216:40: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_hooks.py:234:54: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'Base'> - tests/test_make.py:482:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'A'> - tests/test_make.py:484:26: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'B'> - tests/test_make.py:485:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'B'> - tests/test_make.py:487:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_make.py:488:26: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_make.py:489:27: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_make.py:856:45: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_make.py:893:26: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'BaseClass'> - tests/test_make.py:894:26: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'SubClass'> - tests/test_make.py:1454:32: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument typetypedoes not satisfy upper bound of type variable_A - tests/test_make.py:1465:32: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument typetypedoes not satisfy upper bound of type variable_A - tests/test_make.py:2227:34: error[invalid-argument-type] Argument to function
fields_dictis incorrect: Expectedtype[AttrsInstance], found<class 'Cases'> - tests/test_next_gen.py:41:36: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], foundtype - tests/test_next_gen.py:149:39: error[invalid-argument-type] Argument to function
fields_dictis incorrect: Expectedtype[AttrsInstance], found<class 'NewSchool'> - tests/test_next_gen.py:164:39: error[invalid-argument-type] Argument to function
fields_dictis incorrect: Expectedtype[AttrsInstance], found<class 'NewSchool'> - tests/test_slots.py:103:24: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C1Slots'> - tests/test_slots.py:103:48: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C1'> - tests/test_slots.py:545:41: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'C'> - tests/test_validators.py:884:23: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'Tester'> - tests/test_validators.py:956:23: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'Tester'> - tests/test_validators.py:1029:23: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'Tester'> - tests/typing_example.py:133:13: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'AliasExample'> - tests/typing_example.py:134:13: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'AliasExample'> - tests/typing_example.py:421:13: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'NGFrozen'> - tests/typing_example.py:422:17: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'NGFrozen'> - tests/typing_example.py:426:14: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'NGFrozen'> - tests/typing_example.py:427:18: error[invalid-argument-type] Argument to function
fieldsis incorrect: Expectedtype[AttrsInstance], found<class 'NGFrozen'> - tests/typing_example.py:515:28: error[invalid-argument-type] Argument to function
resolve_typesis incorrect: Argument typetypedoes not satisfy upper bound of type variable_A - Found 660 diagnostics
- Found 555 diagnostics
operator (https://github.com/canonical/operator)
- ops/framework.py:1164:40: error[invalid-argument-type] Argument to bound method
register_typeis incorrect: Expectedtype[Serializable], found<class 'StoredStateData'> - Found 98 diagnostics
- Found 97 diagnostics
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/structured_configs/_implementations.py:2252:47: error[invalid-argument-type] Argument to function
get_target_pathis incorrect: ExpectedHasTarget, found(Importable@builds & ((...) -> object) & type[DataclassInstance] & ~partial[Unknown]) | (((...) -> R@builds) & ((...) -> object) & type[DataclassInstance] & ~partial[Unknown]) | (@Todo(unsupported nested subscript in type[X]) & ((...) -> object) & type[DataclassInstance] & ~partial[Unknown]) | (((...) -> Unknown) & ((...) -> object) & type[DataclassInstance]) | (@Todo(unsupported nested subscript in type[X]) & ((...) -> Unknown) & ((...) -> object) & type[DataclassInstance]) - src/hydra_zen/structured_configs/_implementations.py:2523:54: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedIterable[Unknown], foundUnknown | list[str | DataClass_ | Mapping[str, None | Sequence[str]]] | None
- src/hydra_zen/structured_configs/_implementations.py:2523:54: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedIterable[Unknown], foundUnknown | list[str | DataClass_ | type[@Todo(type[T] for protocols)] | Mapping[str, None | Sequence[str]]] | None
- src/hydra_zen/structured_configs/_implementations.py:3303:54: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedIterable[Unknown], foundUnknown | list[str | DataClass_ | Mapping[str, None | Sequence[str]]] | None
- src/hydra_zen/structured_configs/_implementations.py:3303:54: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedIterable[Unknown], foundUnknown | list[str | DataClass_ | type[@Todo(type[T] for protocols)] | Mapping[str, None | Sequence[str]]] | None
- src/hydra_zen/wrapper/_implementations.py:932:24: error[invalid-return-type] Return type does not match returned value: expected
DataClass_ | ListConfig | DictConfig, found(((...) -> Any) & type & ~type[HydraConf]) | (DataClass_ & type & ~type[HydraConf]) | (ListConfig & type & ~type[HydraConf]) | (DictConfig & type & ~type[HydraConf]) - src/hydra_zen/wrapper/_implementations.py:941:16: error[invalid-return-type] Return type does not match returned value: expected
DataClass_ | ListConfig | DictConfig, found(((...) -> Any) & ~type) | (DataClass_ & ~type) | list[Any] | dict[Any, Any] | (ListConfig & ~type) | (DictConfig & ~type)
- src/hydra_zen/wrapper/_implementations.py:941:16: error[invalid-return-type] Return type does not match returned value: expected
DataClass_ | type[@Todo(type[T] for protocols)] | ListConfig | DictConfig, found(((...) -> Any) & ~type) | (DataClass_ & ~type) | list[Any] | dict[Any, Any] | (ListConfig & ~type) | (DictConfig & ~type)
- src/hydra_zen/wrapper/_implementations.py:1479:9: error[invalid-parameter-default] Default value of type
def default_to_config(target: ((...) -> Any) | DataClass_ | list[Any] | dict[Any, Any] | ListConfig | DictConfig, CustomBuildsFn: @Todo(unsupported type[X] special form) = <class 'DefaultBuilds'>, **kw: Any) -> DataClass_ | ListConfig | DictConfigis not assignable to annotated parameter type(F@__call__, /) -> @Todo(Support fortyping.TypeAlias)
- src/hydra_zen/wrapper/_implementations.py:1479:9: error[invalid-parameter-default] Default value of type
def default_to_config(target: ((...) -> Any) | DataClass_ | list[Any] | dict[Any, Any] | ListConfig | DictConfig, CustomBuildsFn: @Todo(unsupported type[X] special form) = <class 'DefaultBuilds'>, **kw: Any) -> DataClass_ | type[@Todo(type[T] for protocols)] | ListConfig | DictConfigis not assignable to annotated parameter type(F@__call__, /) -> @Todo(Support fortyping.TypeAlias)
- tests/annotations/declarations.py:434:26: error[invalid-argument-type] Argument to function
make_configis incorrect: Expectedtuple[type[DataClass_], ...], foundtuple[type[DataClass], @Todo(unsupported nested subscript in type[X]), <class 'P3'>, @Todo(unsupported nested subscript in type[X])]
- tests/annotations/declarations.py:443:35: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- Found 563 diagnostics
- Found 561 diagnostics
strawberry (https://github.com/strawberry-graphql/strawberry)
- strawberry/cli/commands/export_schema.py:32:32: error[invalid-argument-type] Argument to function
print_schemais incorrect: ExpectedBaseSchema, foundSchema - strawberry/cli/debug_server.py:25:33: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedBaseSchema, foundSchema - strawberry/experimental/pydantic/utils.py:54:51: error[invalid-argument-type] Argument to function
fieldsis incorrect: ExpectedDataclassInstance, foundtype - strawberry/types/base.py:333:16: error[invalid-return-type] Return type does not match returned value: expected
type[WithStrawberryObjectDefinition], foundtype - Found 377 diagnostics
- Found 373 diagnostics
check-jsonschema (https://github.com/python-jsonschema/check-jsonschema)
- src/check_jsonschema/formats/init.py:55:5: error[invalid-assignment] Object of type
<class 'Draft202012Validator'>is not assignable totype[Validator] - Found 59 diagnostics
- Found 58 diagnostics
pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_dataclasses.py:88:39: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- pydantic/_internal/_generate_schema.py:1828:24: error[unresolved-attribute] Type
type[DataclassInstance]has no attribute__pydantic_fields_complete__ - pydantic/_internal/_generate_schema.py:1834:80: error[unresolved-attribute] Type
type[DataclassInstance]has no attribute__pydantic_fields__ - pydantic/_internal/_generate_schema.py:1842:33: error[invalid-argument-type] Argument to function
rebuild_dataclass_fieldsis incorrect: Expectedtype[PydanticDataclass], foundtype[DataclassInstance] - pydantic/_internal/_mock_val_ser.py:217:5: error[invalid-assignment] Object of type
MockValSer[Unknown]is not assignable to attribute__pydantic_validator__of typeSchemaValidator | PluggableSchemaValidator - pydantic/_internal/_mock_val_ser.py:223:5: error[invalid-assignment] Object of type
MockValSer[Unknown]is not assignable to attribute__pydantic_serializer__of typeSchemaSerializer - Found 770 diagnostics
- Found 766 diagnostics
urllib3 (https://github.com/urllib3/urllib3)
- src/urllib3/connectionpool.py:173:5: error[invalid-assignment] Object of type
<class 'HTTPConnection'>is not assignable totype[BaseHTTPConnection] - src/urllib3/connectionpool.py:978:5: error[invalid-assignment] Object of type
<class 'HTTPSConnection'>is not assignable totype[BaseHTTPSConnection] - src/urllib3/contrib/emscripten/init.py:13:5: error[invalid-assignment] Object of type
<class 'EmscriptenHTTPConnection'>is not assignable to attributeConnectionClsof typetype[BaseHTTPConnection] - src/urllib3/contrib/emscripten/init.py:14:5: error[invalid-assignment] Object of type
<class 'EmscriptenHTTPSConnection'>is not assignable to attributeConnectionClsof typetype[BaseHTTPSConnection] - src/urllib3/http2/init.py:35:5: error[invalid-assignment] Object of type
<class 'HTTP2Connection'>is not assignable to attributeConnectionClsof typetype[BaseHTTPSConnection]
- test/conftest.py:381:68: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- test/conftest.py:387:13: error[invalid-assignment] Object of type
None | <class 'HTTPConnection'>is not assignable to attributeConnectionClsof typetype[BaseHTTPConnection]
- test/conftest.py:387:13: error[invalid-assignment] Object of type
None | <class 'HTTPConnection'>is not assignable to attributeConnectionClsof typetype[@Todo(type[T] for protocols)]
- Found 393 diagnostics
- Found 389 diagnostics
pywin32 (https://github.com/mhammond/pywin32)
- com/win32com/demos/excelAddin.py:165:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ExcelAddin'> - com/win32com/demos/excelRTDServer.py:434:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'TimeServer'> - com/win32com/demos/iebutton.py:211:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'PyWin32InternetExplorerButton'> - com/win32com/demos/ietoolbar.py:359:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'IEToolbar'> - com/win32com/demos/outlookAddin.py:131:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'OutlookAddin'> - com/win32com/servers/dictionary.py:129:27: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'DictionaryPolicy'> - com/win32com/servers/interp.py:54:52: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'Interpreter'> - com/win32com/servers/perfmon.py:36:29: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'PerfMonQuery'> - com/win32com/servers/test_pycomtest.py:180:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'PyCOMTest'> - com/win32com/servers/test_pycomtest.py:181:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'PyCOMTestMI'> - com/win32com/test/pippo_server.py:92:45: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'CPippo'> - com/win32comext/axscript/client/pyscript.py:432:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], foundUnknown | <class 'PyScript'> - com/win32comext/shell/demos/servers/column_provider.py:122:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ColumnProvider'> - com/win32comext/shell/demos/servers/context_menu.py:119:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ShellExtension'> - com/win32comext/shell/demos/servers/copy_hook.py:80:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ShellExtension'> - com/win32comext/shell/demos/servers/empty_volume_cache.py:185:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'EmptyVolumeCache'> - com/win32comext/shell/demos/servers/folder_view.py:861:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ShellFolder'> - com/win32comext/shell/demos/servers/folder_view.py:862:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ContextMenu'> - com/win32comext/shell/demos/servers/icon_handler.py:78:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ShellExtension'> - com/win32comext/shell/demos/servers/shell_view.py:967:9: error[invalid-argument-type] Argument to function
UseCommandLineis incorrect: Expectedtype[_RegisterClass], found<class 'ShellFolderRoot'> - Found 2006 diagnostics
- Found 1986 diagnostics
colour (https://github.com/colour-science/colour)
- colour/colorimetry/spectrum.py:1190:17: error[invalid-assignment] Object of type
<class 'SpragueInterpolator'>is not assignable totype[ProtocolInterpolator] | None - colour/colorimetry/spectrum.py:1192:17: error[invalid-assignment] Object of type
<class 'CubicSplineInterpolator'>is not assignable totype[ProtocolInterpolator] | None - colour/colorimetry/spectrum.py:1297:9: error[invalid-assignment] Object of type
type[ProtocolExtrapolator] | None | <class 'Extrapolator'>is not assignable totype[ProtocolExtrapolator] | None - colour/examples/algebra/examples_interpolation.py:107:5: error[invalid-argument-type] Argument to bound method
interpolateis incorrect: Expectedtype[ProtocolInterpolator] | None, found<class 'PchipInterpolator'> - Found 484 diagnostics
- Found 480 diagnostics
mitmproxy (https://github.com/mitmproxy/mitmproxy)
- examples/addons/contentview-interactive.py:20:18: error[invalid-argument-type] Argument to function
addis incorrect: ExpectedContentview, found<class 'InteractiveSwapCase'> - examples/addons/contentview.py:15:18: error[invalid-argument-type] Argument to function
addis incorrect: ExpectedContentview, found<class 'SwapCase'> - test/mitmproxy/contentviews/test__registry.py:67:23: error[invalid-argument-type] Argument to bound method
registeris incorrect: ExpectedContentview, found<class 'ExampleContentview'>
- Found 1822 diagnostics
- Found 1825 diagnostics
psycopg (https://github.com/psycopg/psycopg)
- psycopg/psycopg/_transformer.py:21:5: error[invalid-assignment] Object of type
<class 'Transformer'>is not assignable totype[Transformer] - psycopg/psycopg/pq/init.py:97:9: error[invalid-assignment] Object of type
Unknown | <class 'PGconn'>is not assignable totype[PGconn] - psycopg/psycopg/pq/init.py:98:9: error[invalid-assignment] Object of type
Unknown | <class 'PGresult'>is not assignable totype[PGresult] - psycopg/psycopg/pq/init.py:99:9: error[invalid-assignment] Object of type
Unknown | <class 'Conninfo'>is not assignable totype[Conninfo] - psycopg/psycopg/pq/init.py💯9: error[invalid-assignment] Object of type
Unknown | <class 'Escaping'>is not assignable totype[Escaping] - psycopg/psycopg/pq/init.py:101:9: error[invalid-assignment] Object of type
Unknown | <class 'PGcancel'>is not assignable totype[PGcancel] - psycopg/psycopg/pq/init.py:102:9: error[invalid-assignment] Object of type
Unknown | <class 'PGcancelConn'>is not assignable totype[PGcancelConn] - psycopg/psycopg/types/array.py:342:12: error[invalid-return-type] Return type does not match returned value: expected
type[Loader], foundtype - psycopg/psycopg/types/json.py:124:13: error[invalid-assignment] Method
__setitem__of typebound method dict[tuple[type, CodeType], type[Dumper]].__setitem__(key: tuple[type, CodeType], value: type[Dumper], /) -> Nonecannot be called with a key of typetuple[type, CodeType]and a value of typetypeon object of typedict[tuple[type, CodeType], type[Dumper]] - psycopg/psycopg/types/json.py:126:16: error[invalid-return-type] Return type does not match returned value: expected
type[Dumper], foundtype - psycopg/psycopg/types/json.py:144:13: error[invalid-assignment] Method
__setitem__of typebound method dict[tuple[type, CodeType], type[Loader]].__setitem__(key: tuple[type, CodeType], value: type[Loader], /) -> Nonecannot be called with a key of typetuple[type, CodeType]and a value of typetypeon object of typedict[tuple[type, CodeType], type[Loader]] - psycopg/psycopg/types/json.py:146:16: error[invalid-return-type] Return type does not match returned value: expected
type[Loader], foundtype - tests/fix_db.py:182:5: error[invalid-assignment] Object of type
<class 'PGconnDebug'>is not assignable to attributePGconnof typetype[PGconn] - Found 654 diagnostics
- Found 641 diagnostics
scrapy (https://github.com/scrapy/scrapy)
- tests/test_downloader_handler_twisted_http10.py:26:16: error[invalid-return-type] Return type does not match returned value: expected
type[DownloadHandlerProtocol], found<class 'HTTP10DownloadHandler'> - tests/test_downloader_handler_twisted_http11.py:27:16: error[invalid-return-type] Return type does not match returned value: expected
type[DownloadHandlerProtocol], found<class 'HTTP11DownloadHandler'> - tests/test_downloader_handler_twisted_http2.py:48:16: error[invalid-return-type] Return type does not match returned value: expected
type[DownloadHandlerProtocol], found<class 'H2DownloadHandler'> - Found 1061 diagnostics
- Found 1058 diagnostics
discord.py (https://github.com/Rapptz/discord.py)
- discord/abc.py:689:62: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- discord/app_commands/models.py:1225:42: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], foundAny | <class 'Member'> | <class 'Role'> - discord/audit_logs.py:140:67: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Role'> - discord/audit_logs.py:146:68: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'ForumTag'> - discord/audit_logs.py:147:31: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'ForumTag'> - discord/audit_logs.py:206:39: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Role'> | <class 'Member'> - discord/audit_logs.py:487:43: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Role'> - discord/audit_logs.py:803:55: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Role'> - discord/audit_logs.py:809:89: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'StageChannel'> - discord/audit_logs.py:813:88: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'PartialIntegration'> - discord/audit_logs.py:907:68: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Member'> - discord/audit_logs.py:910:71: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Role'> - discord/audit_logs.py:934:73: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Emoji'> - discord/audit_logs.py:943:68: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Member'> - discord/audit_logs.py:946:81: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'StageInstance'> - discord/audit_logs.py:949:75: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'GuildSticker'> - discord/audit_logs.py:952:73: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Thread'> - discord/audit_logs.py:955:82: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'ScheduledEvent'> - discord/audit_logs.py:958:70: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'PartialIntegration'> - discord/audit_logs.py:966:40: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'AppCommand'> - discord/audit_logs.py:986:42: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'PartialIntegration'> | <class 'AppCommand'> - discord/audit_logs.py:991:72: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'AutoModRule'> - discord/audit_logs.py:997:67: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'Webhook'> - discord/audit_logs.py:1000:34: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'OnboardingPrompt'> - discord/guild.py:4117:45: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'User'> - discord/guild.py:4118:45: error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedtype[Snowflake], found<class 'User'> - discord/utils.py:1458:5: error[invalid-assignment] Object of type
<class '_ZstdDecompressionContext'>is not assignable totype[_DecompressionContext] - discord/utils.py:1482:5: error[invalid-assignment] Object of type
<class '_ZlibDecompressionContext'>is not assignable totype[_DecompressionContext] - Found 567 diagnostics
- Found 541 diagnostics
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/cli/work_pool.py:207:43: error[missing-argument] No argument provided for required parameter
selfof functionprovision - src/prefect/cli/work_pool.py:208:42: error[invalid-argument-type] Argument to function
provisionis incorrect: Expecteddict[str, Any], founddict[str, Any] | None | Any - src/prefect/cli/work_pool.py:499:43: error[missing-argument] No argument provided for required parameter
selfof functionprovision - Found 2971 diagnostics
- Found 2968 diagnostics
No memory usage changes detected ✅