Skip to content

[ty] Respect the gradual guarantee when narrowing using isinstance() and issubclass() - #18900

Merged
AlexWaygood merged 3 commits into
mainfrom
alex/isinstance-gradual
Jun 24, 2025
Merged

AlexWaygood merged 3 commits into
mainfrom
alex/isinstance-gradual

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

Intersect with a dynamic type if a dynamic type is used as the second argument to one of these functions

@github-actions

github-actions Bot commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

mypy_primer results

Changes were detected when running on open source projects
beartype (https://github.com/beartype/beartype)
+ warning[unused-ignore-comment] beartype/_decor/_nontype/_decordescriptor.py:143:43: Unused blanket `type: ignore` directive
+ warning[unused-ignore-comment] beartype/_decor/_nontype/_decordescriptor.py:144:43: Unused blanket `type: ignore` directive
+ warning[unused-ignore-comment] beartype/_decor/_nontype/_decordescriptor.py:145:43: Unused blanket `type: ignore` directive
- warning[possibly-unbound-attribute] beartype/_util/api/external/utilclick.py:101:12: Attribute `callback` on type `BeartypeableT` is possibly unbound
+ warning[unused-ignore-comment] beartype/bite/kind/inferthirdparty.py:134:50: Unused blanket `type: ignore` directive
+ warning[unused-ignore-comment] beartype/bite/kind/inferthirdparty.py:144:64: Unused blanket `type: ignore` directive
- Found 577 diagnostics
+ Found 581 diagnostics

git-revise (https://github.com/mystor/git-revise)
- error[invalid-return-type] gitrevise/odb.py:491:20: Return type does not match returned value: expected `Self`, found `GitObj`
- Found 3 diagnostics
+ Found 2 diagnostics

anyio (https://github.com/agronholm/anyio)
- error[unresolved-attribute] src/anyio/_core/_exceptions.py:87:20: Type `BaseException` has no attribute `exceptions`
- Found 101 diagnostics
+ Found 100 diagnostics

kornia (https://github.com/kornia/kornia)
- warning[possibly-unbound-attribute] kornia/augmentation/_2d/mix/transplantation.py:182:13: Attribute `ndim` on type `Sequence[int] | (Unknown & ~None) | list[Unknown] | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/_2d/mix/transplantation.py:183:74: Attribute `ndim` on type `Sequence[int] | (Unknown & ~None) | list[Unknown] | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:277:36: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:277:51: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:278:39: Attribute `view` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:278:54: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:278:69: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:278:84: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:297:36: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:297:51: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:298:39: Attribute `view` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:298:54: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:298:69: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:298:84: Attribute `size` on type `Unknown | Boxes` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:317:36: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:317:51: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:318:31: Attribute `view` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:318:46: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:318:61: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:337:36: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:337:51: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:338:31: Attribute `view` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:338:46: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/container/video.py:338:61: Attribute `size` on type `Unknown | Keypoints` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:51:8: Attribute `dim` on type `Unknown | int | float | tuple[int | float, int | float] | list[int | float]` is possibly unbound
- error[unsupported-operator] kornia/augmentation/utils/param_validation.py:52:12: Operator `<` is not supported for types `tuple[int | float, int | float]` and `Literal[0]`, in comparing `Unknown | int | float | tuple[int | float, int | float] | list[int | float]` with `Literal[0]`
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:59:24: Attribute `repeat` on type `Unknown | int | float | tuple[int | float, int | float] | list[int | float]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:59:70: Attribute `device` on type `Unknown | int | float | tuple[int | float, int | float] | list[int | float]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:59:91: Attribute `dtype` on type `Unknown | int | float | tuple[int | float, int | float] | list[int | float]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:138:17: Attribute `shape` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:138:50: Attribute `shape` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- error[invalid-argument-type] kornia/augmentation/utils/param_validation.py:138:82: Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | int | float | tuple[Any, ...]`
- error[unsupported-operator] kornia/augmentation/utils/param_validation.py:139:16: Operator `<` is not supported for types `tuple[Any, ...]` and `Literal[0]`, in comparing `Unknown | int | float | tuple[Any, ...]` with `Literal[0]`
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:141:31: Attribute `repeat` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:146:18: Attribute `shape` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- error[invalid-argument-type] kornia/augmentation/utils/param_validation.py:146:50: Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | int | float | tuple[Any, ...]`
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:147:31: Attribute `repeat` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:149:18: Attribute `shape` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- error[invalid-argument-type] kornia/augmentation/utils/param_validation.py:149:50: Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | int | float | tuple[Any, ...]`
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:150:31: Attribute `unsqueeze` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:154:14: Attribute `shape` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/augmentation/utils/param_validation.py:155:31: Attribute `to` on type `Unknown | int | float | tuple[Any, ...]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/constants.py:109:28: Attribute `item` on type `str | int | Unknown | DType` is possibly unbound
- warning[possibly-unbound-attribute] kornia/contrib/diamond_square.py:192:24: Attribute `view` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/contrib/diamond_square.py:200:21: Attribute `view` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/core/mixin/image_module.py:193:20: Attribute `detach` on type `Unknown | list[Unknown] | tuple[Unknown]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/core/module.py:204:20: Attribute `detach` on type `Unknown | list[Unknown] | tuple[Unknown]` is possibly unbound
- error[invalid-argument-type] kornia/enhance/adjust.py:370:22: Argument to function `any` is incorrect: Expected `Iterable[object]`, found `bool | (bool & Unknown) | Unknown`
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:654:47: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- error[invalid-argument-type] kornia/enhance/adjust.py:655:38: Argument to function `len` is incorrect: Expected `Sized`, found `int | float | Unknown`
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:655:58: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:658:22: Attribute `to` on type `int | float | Unknown` is possibly unbound
- error[invalid-argument-type] kornia/enhance/adjust.py:722:42: Argument to function `len` is incorrect: Expected `Sized`, found `(int & ~float) | (Unknown & ~None & ~float) | Unknown`
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:849:12: Attribute `size` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:849:36: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:852:40: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/adjust.py:873:12: Attribute `size` on type `int | float | Unknown` is possibly unbound
- error[invalid-argument-type] kornia/enhance/adjust.py:875:87: Argument to function `len` is incorrect: Expected `Sized`, found `int | float | Unknown`
- warning[possibly-unbound-attribute] kornia/enhance/core.py:63:36: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/core.py:68:36: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/core.py:73:36: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/normalize.py:239:12: Attribute `shape` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/enhance/normalize.py:239:34: Attribute `shape` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/feature/adalam/ransac.py:88:29: Attribute `float` on type `Unknown | None` is possibly unbound
- error[unresolved-attribute] kornia/feature/hardnet.py:179:33: Type `object` has no attribute `weight`
- error[unresolved-attribute] kornia/feature/hardnet.py:180:16: Type `object` has no attribute `bias`
- error[unresolved-attribute] kornia/feature/hardnet.py:181:35: Type `object` has no attribute `bias`
- warning[possibly-unbound-attribute] kornia/filters/bilateral.py:53:23: Attribute `to` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/guided.py:70:15: Attribute `view` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/guided.py:112:97: Attribute `view` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/in_range.py:138:39: Attribute `shape` on type `tuple[Any, ...] | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/in_range.py:138:52: Attribute `shape` on type `tuple[Any, ...] | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/in_range.py:142:17: Attribute `to` on type `tuple[Any, ...] | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/in_range.py:143:17: Attribute `to` on type `tuple[Any, ...] | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:72:8: Attribute `dim` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:80:8: Attribute `dim` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:85:9: Attribute `size` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:85:30: Attribute `size` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:171:8: Attribute `dim` on type `Unknown | tuple[int | float, int | float, int | float]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:179:8: Attribute `dim` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:184:9: Attribute `size` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:184:30: Attribute `size` on type `Unknown | tuple[int | float, int | float, int | float]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:185:67: Attribute `shape` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] kornia/filters/kernels_geometry.py:185:89: Attribute `shape` on type `Unknown | tuple[int | float, int | float, int | float]` is possibly unbound
- warning[possibly-unbound-attribute] kornia/geometry/transform/elastic_transform.py:90:17: Attribute `expand` on type `tuple[int | float, int | float] | Unknown` is possibly unbound
- Found 952 diagnostics
+ Found 867 diagnostics

aiortc (https://github.com/aiortc/aiortc)
- error[unresolved-attribute] src/aiortc/contrib/media.py:118:52: Type `Exception` has no attribute `errno`
- error[unresolved-attribute] src/aiortc/contrib/media.py:181:52: Type `Exception` has no attribute `errno`
- Found 104 diagnostics
+ Found 102 diagnostics

dulwich (https://github.com/dulwich/dulwich)
- error[unresolved-attribute] dulwich/bundle.py:48:28: Type `object` has no attribute `version`
- error[unresolved-attribute] dulwich/bundle.py:50:33: Type `object` has no attribute `capabilities`
- error[unresolved-attribute] dulwich/bundle.py:52:34: Type `object` has no attribute `prerequisites`
- error[unresolved-attribute] dulwich/bundle.py:54:31: Type `object` has no attribute `references`
- error[unresolved-attribute] dulwich/bundle.py:56:30: Type `object` has no attribute `pack_data`
- error[unresolved-attribute] dulwich/config.py:339:54: Type `object` has no attribute `_values`
- error[unresolved-attribute] dulwich/ignore.py:336:33: Type `object` has no attribute `pattern`
- error[unresolved-attribute] dulwich/ignore.py:337:36: Type `object` has no attribute `ignorecase`
- error[invalid-return-type] dulwich/objects.py:684:16: Return type does not match returned value: expected `Blob`, found `ShaFile`
- error[invalid-return-type] dulwich/objects.py:832:16: Return type does not match returned value: expected `Tag`, found `ShaFile`
- error[invalid-return-type] dulwich/objects.py:1184:16: Return type does not match returned value: expected `Tree`, found `ShaFile`
- error[invalid-return-type] dulwich/objects.py:1530:16: Return type does not match returned value: expected `Commit`, found `ShaFile`
- Found 166 diagnostics
+ Found 154 diagnostics

kopf (https://github.com/nolar/kopf)
- warning[possibly-unbound-attribute] kopf/_cogs/structs/dicts.py:241:25: Attribute `obj` on type `(_T & ~None) | Iterable[_T]` is possibly unbound
+ warning[possibly-unbound-attribute] kopf/_cogs/structs/dicts.py:241:25: Attribute `obj` on type `(_T & Unknown & ~None) | (Iterable[_T] & Unknown) | (_T & _dummy) | (Iterable[_T] & _dummy)` is possibly unbound

trio (https://github.com/python-trio/trio)
- error[unresolved-attribute] src/trio/_tests/test_file_io.py:102:26: Type `Loader | None` has no attribute `get_source`
- Found 1009 diagnostics
+ Found 1008 diagnostics

comtypes (https://github.com/enthought/comtypes)
+ warning[unused-ignore-comment] comtypes/_post_coinit/unknwn.py:334:43: Unused blanket `type: ignore` directive
+ warning[unused-ignore-comment] comtypes/_post_coinit/unknwn.py:343:61: Unused blanket `type: ignore` directive
- error[unresolved-attribute] comtypes/_vtbl.py:58:16: Type `Exception` has no attribute `hresult`
- error[unresolved-attribute] comtypes/_vtbl.py:60:16: Type `Exception` has no attribute `winerror`

sockeye (https://github.com/awslabs/sockeye)
- warning[possibly-unbound-attribute] sockeye/beam_search.py:352:22: Attribute `to` on type `@Todo(Type::Intersection.call()) | float` is possibly unbound
- warning[possibly-unbound-attribute] sockeye/training.py:885:58: Attribute `size` on type `int | float | Unknown` is possibly unbound
- Found 342 diagnostics
+ Found 340 diagnostics

strawberry (https://github.com/strawberry-graphql/strawberry)
- error[unresolved-attribute] strawberry/utils/typing.py:128:13: Type `type` has no attribute `__origin__`
- Found 375 diagnostics
+ Found 374 diagnostics

PyGithub (https://github.com/PyGithub/PyGithub)
- warning[possibly-unbound-attribute] github/MainClass.py:904:42: Attribute `_identity` on type `@Todo(unknown type subscript) | _NotSetType` is possibly unbound
+ warning[possibly-unbound-attribute] github/MainClass.py:904:42: Attribute `_identity` on type `@Todo(unknown type subscript) | (_NotSetType & Unknown) | _NotSetType` is possibly unbound

nox (https://github.com/wntrblm/nox)
- error[unresolved-attribute] nox/_parametrize.py:91:30: Type `object` has no attribute `args`
- error[unresolved-attribute] nox/_parametrize.py:92:39: Type `object` has no attribute `arg_names`
- error[unresolved-attribute] nox/_parametrize.py:93:32: Type `object` has no attribute `id`
- error[unresolved-attribute] nox/_parametrize.py:94:34: Type `object` has no attribute `tags`
- Found 28 diagnostics
+ Found 24 diagnostics

ignite (https://github.com/pytorch/ignite)
- warning[possibly-unbound-attribute] ignite/distributed/auto.py:88:24: Attribute `rank` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/distributed/auto.py:89:78: Attribute `rank` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/distributed/auto.py:90:24: Attribute `num_replicas` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/distributed/auto.py:92:76: Attribute `num_replicas` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/distributed/comp_models/base.py:112:21: Attribute `shape` on type `Unknown | int | float | str | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/distributed/comp_models/base.py:113:25: Attribute `dtype` on type `Unknown | int | float | str | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/engine/__init__.py:558:19: Attribute `type` on type `str | Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/engine/__init__.py:805:19: Attribute `type` on type `str | Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] ignite/handlers/param_scheduler.py:1151:13: Attribute `last_epoch` on type `ParamScheduler | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/accumulation.py:78:22: Attribute `detach` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/accumulation.py:85:34: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/accumulation.py:85:57: Attribute `shape` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/accumulation.py:190:48: Attribute `ndim` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/accumulation.py:191:21: Attribute `sum` on type `int | float | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/metric.py:886:16: Attribute `unsqueeze` on type `Unknown | Number` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/running_average.py:154:22: Attribute `detach` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] ignite/metrics/vision/object_detection_average_precision_recall.py:36:12: Attribute `size` on type `Unknown | dict[str, Unknown]` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:103:46: Attribute `dtype` on type `Unknown | int | float | str` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:103:75: Attribute `shape` on type `Unknown | int | float | str` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:112:46: Attribute `dtype` on type `Unknown | int | float | str` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:112:71: Attribute `shape` on type `Unknown | int | float | str` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:117:46: Attribute `dtype` on type `Unknown | int | float | str` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:117:71: Attribute `shape` on type `Unknown | int | float | str` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/comp_models/test_base.py:129:20: Attribute `all` on type `Unknown | bool` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/utils/__init__.py:351:24: Attribute `all` on type `Unknown | bool` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/distributed/utils/__init__.py:352:42: Attribute `dtype` on type `Unknown | int | float | str` is possibly unbound
- error[unresolved-attribute] tests/ignite/engine/test_create_supervised.py:369:19: Type `str | None` has no attribute `type`
- error[unresolved-attribute] tests/ignite/engine/test_create_supervised.py:405:19: Type `str | None` has no attribute `type`
- warning[possibly-unbound-attribute] tests/ignite/metrics/nlp/test_bleu.py:69:24: Attribute `cpu` on type `None | Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/metrics/nlp/test_bleu.py:161:20: Attribute `cpu` on type `None | Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/metrics/nlp/test_bleu.py:173:20: Attribute `cpu` on type `None | Unknown | int | float` is possibly unbound
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:60:69: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:61:68: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:62:66: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:63:70: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:64:67: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:65:69: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:77:46: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:78:45: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:79:43: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:80:46: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:81:43: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:82:45: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:135:69: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:136:68: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:137:66: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:138:70: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:139:67: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
+ error[call-non-callable] tests/ignite/metrics/test_classification_report.py:140:69: Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]` is not callable on object of type `str`
- warning[possibly-unbound-attribute] tests/ignite/metrics/test_running_average.py:240:16: Attribute `requires_grad` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/metrics/test_running_average.py:245:16: Attribute `requires_grad` on type `Unknown | int | float` is possibly unbound
- warning[possibly-unbound-attribute] tests/ignite/metrics/test_running_average.py:250:16: Attribute `requires_grad` on type `Unknown | int | float` is possibly unbound
- Found 2395 diagnostics
+ Found 2379 diagnostics

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ error[invalid-return-type] bson/regex.py:83:16: Return type does not match returned value: expected `Regex[_T]`, found `Regex[str]`
- error[invalid-argument-type] pymongo/asynchronous/pool.py:646:53: Argument to function `_raise_connection_failure` is incorrect: Expected `Exception`, found `BaseException`
- error[invalid-argument-type] pymongo/asynchronous/pool.py:1060:57: Argument to function `_raise_connection_failure` is incorrect: Expected `Exception`, found `BaseException`
- error[unresolved-attribute] pymongo/asynchronous/topology.py:1071:39: Type `object` has no attribute `eq_props`
- error[unresolved-attribute] pymongo/operations.py:507:17: Type `object` has no attribute `_filter`
- error[unresolved-attribute] pymongo/operations.py:508:17: Type `object` has no attribute `_doc`
- error[unresolved-attribute] pymongo/operations.py:509:17: Type `object` has no attribute `_upsert`
- error[unresolved-attribute] pymongo/operations.py:510:17: Type `object` has no attribute `_collation`
- error[unresolved-attribute] pymongo/operations.py:511:17: Type `object` has no attribute `_array_filters`
- error[unresolved-attribute] pymongo/operations.py:512:17: Type `object` has no attribute `_hint`
- error[unresolved-attribute] pymongo/operations.py:513:17: Type `object` has no attribute `_namespace`
- error[unresolved-attribute] pymongo/operations.py:514:17: Type `object` has no attribute `_sort`
- error[invalid-argument-type] pymongo/synchronous/pool.py:644:53: Argument to function `_raise_connection_failure` is incorrect: Expected `Exception`, found `BaseException`
- error[invalid-argument-type] pymongo/synchronous/pool.py:1056:57: Argument to function `_raise_connection_failure` is incorrect: Expected `Exception`, found `BaseException`
- error[unresolved-attribute] pymongo/synchronous/topology.py:1069:39: Type `object` has no attribute `eq_props`
- Found 523 diagnostics
+ Found 510 diagnostics

pydantic (https://github.com/pydantic/pydantic)
- warning[possibly-unbound-attribute] pydantic/_internal/_fields.py:354:78: Attribute `default` on type `Any | PydanticUndefinedType` is possibly unbound
- warning[possibly-unbound-attribute] pydantic/_internal/_fields.py:360:27: Attribute `default` on type `Any | PydanticUndefinedType` is possibly unbound
- error[invalid-assignment] pydantic/_internal/_fields.py:361:17: Object of type `@Todo(Type::Intersection.call())` is not assignable to attribute `default` on type `Any | PydanticUndefinedType`
- warning[possibly-unbound-attribute] pydantic/_internal/_fields.py:362:17: Attribute `_attributes_set` on type `Any | PydanticUndefinedType` is possibly unbound
- error[invalid-argument-type] pydantic/experimental/pipeline.py:162:69: Argument is incorrect: Expected `type[Any]`, found `@Todo(unsupported type[X] special form) | ellipsis`
- warning[possibly-unbound-attribute] pydantic/v1/mypy.py:637:81: Attribute `items` on type `Unknown | None` is possibly unbound
- Found 731 diagnostics
+ Found 725 diagnostics

werkzeug (https://github.com/pallets/werkzeug)
- error[invalid-return-type] src/werkzeug/routing/rules.py:312:12: Return type does not match returned value: expected `_ASTT`, found `(stmt & ~Expr) | expr`
- error[unresolved-attribute] src/werkzeug/routing/rules.py:910:65: Type `object` has no attribute `_trace`
- Found 432 diagnostics
+ Found 430 diagnostics

optuna (https://github.com/optuna/optuna)
- warning[possibly-unbound-attribute] tests/visualization_tests/test_edf.py:37:9: Attribute `write_image` on type `Unknown | ndarray[Unknown, Unknown]` is possibly unbound
- error[unresolved-attribute] tests/visualization_tests/test_slice.py:83:9: Type `Sequence[Unknown]` has no attribute `layout`
- Found 965 diagnostics
+ Found 963 diagnostics

mkdocs (https://github.com/mkdocs/mkdocs)
- error[invalid-argument-type] mkdocs/config/config_options.py:346:46: Argument to function `len` is incorrect: Expected `Sized`, found `object`
- error[invalid-argument-type] mkdocs/config/config_options.py:349:61: Argument to function `len` is incorrect: Expected `Sized`, found `object`
- error[invalid-return-type] mkdocs/config/config_options.py:352:20: Return type does not match returned value: expected `T`, found `object`
- Found 200 diagnostics
+ Found 197 diagnostics

apprise (https://github.com/caronc/apprise)
- warning[possibly-unbound-attribute] apprise/apprise.py:132:37: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/apprise.py:192:44: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/apprise.py:196:43: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:243:43: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:306:43: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:317:38: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:321:38: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:680:46: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:691:39: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:723:37: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:1008:39: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:1026:41: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] apprise/config/base.py:1074:42: Attribute `secure_logging` on type `Unknown | None` is possibly unbound
- Found 4316 diagnostics
+ Found 4303 diagnostics

schemathesis (https://github.com/schemathesis/schemathesis)
- error[unresolved-attribute] src/schemathesis/core/failures.py:94:57: Type `BaseException` has no attribute `exceptions`
- Found 312 diagnostics
+ Found 311 diagnostics

porcupine (https://github.com/Akuli/porcupine)
- warning[possibly-unbound-attribute] porcupine/plugins/langserver.py:231:16: Attribute `value` on type `list[Unknown | str] | Unknown | str` is possibly unbound
- error[invalid-return-type] porcupine/plugins/langserver.py:234:12: Return type does not match returned value: expected `str`, found `(list[Unknown | str] & ~list[Unknown]) | (Unknown & ~list[Unknown]) | (str & ~list[Unknown])`
- Found 50 diagnostics
+ Found 48 diagnostics

schema_salad (https://github.com/common-workflow-language/schema_salad)
- error[unresolved-attribute] schema_salad/validate.py:178:12: Type `Schema` has no attribute `name`
- error[unresolved-attribute] schema_salad/validate.py:190:12: Type `Schema` has no attribute `name`
- error[unresolved-attribute] schema_salad/validate.py:198:21: Type `Schema` has no attribute `symbols`
- error[unresolved-attribute] schema_salad/validate.py:204:30: Type `Schema` has no attribute `name`
- error[unresolved-attribute] schema_salad/validate.py:205:38: Type `Schema` has no attribute `symbols`
- error[unresolved-attribute] schema_salad/validate.py:206:39: Type `Schema` has no attribute `symbols`
- error[unresolved-attribute] schema_salad/validate.py:216:25: Type `Schema` has no attribute `items`
- error[unresolved-attribute] schema_salad/validate.py:237:46: Type `Schema` has no attribute `items`
- error[unresolved-attribute] schema_salad/validate.py:241:18: Type `Schema` has no attribute `schemas`
- error[unresolved-attribute] schema_salad/validate.py:260:18: Type `Schema` has no attribute `schemas`
- error[unresolved-attribute] schema_salad/validate.py:316:59: Type `Schema` has no attribute `name`
- error[unresolved-attribute] schema_salad/validate.py:321:18: Type `Schema` has no attribute `fields`
- error[unresolved-attribute] schema_salad/validate.py:331:20: Type `Schema` has no attribute `name`
- error[unresolved-attribute] schema_salad/validate.py:334:47: Type `Schema` has no attribute `name`
- error[unresolved-attribute] schema_salad/validate.py:341:18: Type `Schema` has no attribute `fields`
- error[unresolved-attribute] schema_salad/validate.py:382:22: Type `Schema` has no attribute `fields`
- error[unresolved-attribute] schema_salad/validate.py:434:68: Type `Schema` has no attribute `fields`
- error[unresolved-attribute] schema_salad/validate.py:459:25: Type `Schema` has no attribute `values`
- error[unresolved-attribute] schema_salad/validate.py:480:48: Type `Schema` has no attribute `values`
- Found 387 diagnostics
+ Found 368 diagnostics

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- error[unresolved-attribute] mitmproxy/proxy/layer.py:282:17: Type `Event` has no attribute `connection`
- error[invalid-return-type] mitmproxy/proxy/mode_servers.py:122:16: Return type does not match returned value: expected `Self`, found `ServerInstance[Unknown]`
- warning[possibly-unbound-attribute] mitmproxy/proxy/mode_servers.py:214:52: Attribute `get_extra_info` on type `StreamWriter | (Unknown & ~None) | StreamReader | Unknown` is possibly unbound
- error[invalid-return-type] mitmproxy/proxy/mode_specs.py:134:16: Return type does not match returned value: expected `Self`, found `ProxyMode`
- Found 1834 diagnostics
+ Found 1830 diagnostics

pytest (https://github.com/pytest-dev/pytest)
- error[unresolved-attribute] src/_pytest/_code/code.py:480:19: Type `BaseException` has no attribute `message`
- error[invalid-return-type] src/_pytest/mark/structures.py:154:20: Return type does not match returned value: expected `ParameterSet`, found `object`
- error[unresolved-attribute] src/_pytest/raises.py:1088:52: Type `BaseException` has no attribute `exceptions`
- error[unresolved-attribute] src/_pytest/raises.py:1150:54: Type `BaseException` has no attribute `exceptions`
- error[unresolved-attribute] src/_pytest/raises.py:1193:45: Type `BaseException` has no attribute `exceptions`
- warning[possibly-unbound-attribute] src/_pytest/unittest.py:498:29: Attribute `value` on type `(@Todo(Inference of subscript on special form) & BaseException) | BaseException` is possibly unbound
- warning[possibly-unbound-attribute] src/_pytest/unittest.py:498:48: Attribute `value` on type `(@Todo(Inference of subscript on special form) & BaseException) | BaseException` is possibly unbound
- Found 648 diagnostics
+ Found 641 diagnostics

scrapy (https://github.com/scrapy/scrapy)
- error[not-iterable] scrapy/http/response/text.py:277:24: Object of type `Iterable[str | Link] | Unknown | None` may not be iterable
- warning[possibly-unbound-attribute] scrapy/logformatter.py:103:19: Attribute `getErrorMessage` on type `Response | (Unknown & ~None)` is possibly unbound
- Found 1158 diagnostics
+ Found 1156 diagnostics

discord.py (https://github.com/Rapptz/discord.py)
- error[unresolved-attribute] discord/flags.py:174:68: Type `object` has no attribute `value`
- error[unresolved-attribute] discord/mixins.py:38:20: Type `object` has no attribute `id`
- error[unresolved-attribute] discord/object.py:106:31: Type `object` has no attribute `id`
- error[unresolved-attribute] discord/reaction.py:118:54: Type `object` has no attribute `emoji`
- error[unresolved-attribute] discord/reaction.py:122:20: Type `object` has no attribute `emoji`
- error[unresolved-attribute] discord/soundboard.py:88:31: Type `object` has no attribute `id`
- Found 576 diagnostics
+ Found 570 diagnostics

django-stubs (https://github.com/typeddjango/django-stubs)
- error[unresolved-attribute] mypy_django_plugin/django/context.py:331:64: Type `Field[Any, Any] | ForeignObjectRel | (AutoField[Unknown, Unknown] & Field[Unknown, Unknown])` has no attribute `base_field`
+ warning[possibly-unbound-attribute] mypy_django_plugin/django/context.py:331:64: Attribute `base_field` on type `(Field[Any, Any] & ArrayField[Unknown, Unknown]) | (ForeignObjectRel & ArrayField[Unknown, Unknown]) | (Field[Any, Any] & ArrayField) | (ForeignObjectRel & ArrayField) | (AutoField[Unknown, Unknown] & Field[Unknown, Unknown] & ArrayField[Unknown, Unknown]) | (AutoField[Unknown, Unknown] & Field[Unknown, Unknown] & ArrayField)` is possibly unbound
- warning[possibly-unbound-attribute] mypy_django_plugin/transformers/forms.py:34:61: Attribute `item` on type `(Unknown & ~None) | Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] mypy_django_plugin/transformers/forms.py:35:16: Attribute `item` on type `(Unknown & ~None) | Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] mypy_django_plugin/transformers/forms.py:38:47: Attribute `ret_type` on type `(Unknown & ~None) | Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] mypy_django_plugin/transformers/managers.py:101:17: Attribute `items` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] mypy_django_plugin/transformers/managers.py:169:16: Attribute `type` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] mypy_django_plugin/transformers/managers.py:171:16: Attribute `func` on type `Unknown | None` is possibly unbound
- Found 469 diagnostics
+ Found 463 diagnostics

static-frame (https://github.com/static-frame/static-frame)
- error[invalid-argument-type] static_frame/core/frame.py:2101:31: Argument to function `loads` is incorrect: Expected `str | bytes | bytearray`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2103:30: Argument to function `load` is incorrect: Expected `SupportsRead[str | bytes]`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2147:31: Argument to function `loads` is incorrect: Expected `str | bytes | bytearray`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2149:30: Argument to function `load` is incorrect: Expected `SupportsRead[str | bytes]`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2192:31: Argument to function `loads` is incorrect: Expected `str | bytes | bytearray`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2194:30: Argument to function `load` is incorrect: Expected `SupportsRead[str | bytes]`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2233:31: Argument to function `loads` is incorrect: Expected `str | bytes | bytearray`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2235:30: Argument to function `load` is incorrect: Expected `SupportsRead[str | bytes]`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2274:31: Argument to function `loads` is incorrect: Expected `str | bytes | bytearray`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2276:30: Argument to function `load` is incorrect: Expected `SupportsRead[str | bytes]`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2306:31: Argument to function `loads` is incorrect: Expected `str | bytes | bytearray`, found `str | StringIO`
- error[invalid-argument-type] static_frame/core/frame.py:2308:30: Argument to function `load` is incorrect: Expected `SupportsRead[str | bytes]`, found `str | StringIO`
- error[not-iterable] static_frame/core/frame.py:6172:61: Object of type `Unknown | Literal[0]` may not be iterable
- error[invalid-argument-type] static_frame/core/index_hierarchy.py:509:45: Argument to function `__new__` is incorrect: Expected `SupportsIndex`, found `(int & ~Literal[1]) | None`
+ warning[unused-ignore-comment] static_frame/core/index_hierarchy.py:2055:42: Unused blanket `type: ignore` directive
+ warning[unused-ignore-comment] static_frame/core/util.py:2088:44: Unused blanket `type: ignore` directive
- Found 1849 diagnostics
+ Found 1837 diagnostics

bokeh (https://github.com/bokeh/bokeh)
- error[unresolved-attribute] src/bokeh/core/property/bases.py:147:34: Type `object` has no attribute `_default`
- error[unresolved-attribute] src/bokeh/core/property/bases.py:148:31: Type `object` has no attribute `_help`
- error[unresolved-attribute] src/bokeh/core/property/bases.py:149:38: Type `object` has no attribute `alternatives`
- error[unresolved-attribute] src/bokeh/core/property/bases.py:150:36: Type `object` has no attribute `assertions`
- error[unresolved-attribute] src/bokeh/core/property/bases.py:469:66: Type `object` has no attribute `type_params`
- error[unresolved-attribute] src/bokeh/core/property/struct.py:79:62: Type `object` has no attribute `_fields`
- error[unresolved-attribute] src/bokeh/core/property/struct.py:79:98: Type `object` has no attribute `_optional`
- warning[possibly-unbound-attribute] src/bokeh/core/property/visual.py:206:22: Attribute `format` on type `(Any & ~ndarray[Unknown, Unknown] & ~str) | (Unknown & ~str) | Path | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/core/property/visual.py:207:13: Attribute `save` on type `(Any & ~ndarray[Unknown, Unknown] & ~str) | (Unknown & ~str) | Path | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/models/plots.py:434:21: Attribute `build_url` on type `Unknown | str` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/models/plots.py:435:29: Attribute `html_attribution` on type `Unknown | str` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/models/plots.py:436:26: Attribute `get` on type `Unknown | str` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/models/plots.py:437:26: Attribute `get` on type `Unknown | str` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/plotting/_plot.py:86:48: Attribute `groups` on type `Range | tuple[int | float, int | float] | Sequence[str] | (@Todo(unknown type subscript) & ~None)` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/util/serialization.py:186:16: Attribute `to_timestamp` on type `Any | date | time | datetime64[date | int | None]` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/util/serialization.py:190:16: Attribute `value` on type `Any | date | time | datetime64[date | int | None]` is possibly unbound
- warning[possibly-unbound-attribute] src/bokeh/util/serialization.py:194:16: Attribute `value` on type `Any | date | time | datetime64[date | int | None]` is possibly unbound
- Found 913 diagnostics
+ Found 896 diagnostics

streamlit (https://github.com/streamlit/streamlit)
- warning[possibly-unbound-attribute] lib/streamlit/commands/execution_control.py:207:28: Attribute `_script_hash` on type `str | Path | Unknown` is possibly unbound
- error[unresolved-attribute] lib/streamlit/elements/exception.py:272:31: Type `BaseException` has no attribute `tacked_on_stack`
- warning[possibly-unbound-attribute] lib/streamlit/elements/lib/image_utils.py:409:50: Attribute `shape` on type `(@Todo(unknown type subscript) & ~list[Unknown] & ~str) | (list[str] & ~list[Unknown] & ~str) | None` is possibly unbound
- warning[possibly-unbound-attribute] lib/streamlit/elements/lib/image_utils.py:410:20: Attribute `tolist` on type `(@Todo(unknown type subscript) & ~list[Unknown] & ~str) | (list[str] & ~list[Unknown] & ~str) | None` is possibly unbound
- warning[possibly-unbound-attribute] lib/streamlit/elements/widgets/button.py:932:48: Attribute `_script_hash` on type `str | Path | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] lib/streamlit/elements/widgets/button.py:933:36: Attribute `url_path` on type `str | Path | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] lib/streamlit/elements/widgets/button.py:935:41: Attribute `title` on type `str | Path | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] lib/streamlit/elements/widgets/button.py:937:40: Attribute `icon` on type `str | Path | Unknown` is possibly unbound
- Found 3284 diagnostics
+ Found 3276 diagnostics

meson (https://github.com/mesonbuild/meson)
- error[unresolved-attribute] mesonbuild/envconfig.py:245:39: Type `object` has no attribute `properties`
- Found 1179 diagnostics
+ Found 1178 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
- warning[possibly-unbound-attribute] src/integrations/prefect-dbt/prefect_dbt/cloud/models.py:20:44: Attribute `flow_run` on type `EngineContext | TaskRunContext` is possibly unbound
- warning[possibly-unbound-attribute] src/integrations/prefect-dbt/prefect_dbt/cloud/models.py:20:44: Attribute `name` on type `FlowRun | None` is possibly unbound
+ warning[possibly-unbound-attribute] src/integrations/prefect-dbt/prefect_dbt/cloud/models.py:20:44: Attribute `name` on type `(FlowRun & Unknown) | (None & Unknown) | Unknown | FlowRun | None` is possibly unbound
- warning[possibly-unbound-attribute] src/prefect/client/orchestration/_deployments/client.py:354:51: Attribute `response` on type `Unknown | ValueError` is possibly unbound
- warning[possibly-unbound-attribute] src/prefect/client/orchestration/_deployments/client.py:1018:51: Attribute `response` on type `Unknown | ValueError` is possibly unbound
+ warning[unused-ignore-comment] src/prefect/settings/legacy.py:67:54: Unused blanket `type: ignore` directive
- Found 4284 diagnostics
+ Found 4282 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- warning[possibly-unbound-attribute] ddtrace/contrib/internal/cassandra/session.py:144:33: Attribute `_statements_and_parameters` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] ddtrace/contrib/internal/cassandra/session.py:170:33: Attribute `_statements_and_parameters` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] ddtrace/contrib/internal/graphql/patch.py:274:27: Attribute `middlewares` on type `(Any & ~AlwaysFalsy) | list[Unknown]` is possibly unbound
- warning[possibly-unbound-attribute] ddtrace/contrib/internal/pylibmc/client.py:59:47: Attribute `addresses` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] ddtrace/contrib/internal/urllib3/patch.py:146:19: Attribute `total` on type `Any | None` is possibly unbound
- warning[possibly-unbound-attribute] tests/ci_visibility/test_ci_visibility.py:345:20: Attribute `_base_url` on type `_TestVisibilityAPIClientBase | None` is possibly unbound
- error[unresolved-attribute] tests/debugging/function/test_discovery.py:139:17: Type `def instancestuff(self, bar=None) -> Unknown` has no attribute `__wrapped__`
- error[unresolved-attribute] tests/debugging/function/test_discovery.py:139:60: Type `def instancestuff(self, bar=None) -> Unknown` has no attribute `__wrapped__`
- Found 7048 diagnostics
+ Found 7040 diagnostics

rotki (https://github.com/rotki/rotki)
- warning[possibly-unbound-attribute] rotkehlchen/api/rest.py:2222:13: Attribute `save` on type `Unknown | Path` is possibly unbound
- warning[possibly-unbound-attribute] rotkehlchen/api/v1/fields.py:915:56: Attribute `filename` on type `str | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] rotkehlchen/api/v1/fields.py:915:83: Attribute `filename` on type `str | Unknown` is possibly unbound
- warning[possibly-unbound-attribute] rotkehlchen/api/v1/fields.py:917:35: Attribute `filename` on type `str | Unknown` is possibly unbound
+ warning[unused-ignore-comment] rotkehlchen/serialization/serialize.py:187:30: Unused blanket `type: ignore` directive
- Found 1766 diagnostics
+ Found 1763 diagnostics

zulip (https://github.com/zulip/zulip)
- error[unresolved-attribute] corporate/lib/stripe.py:1205:53: Type `Exception` has no attribute `user_message`
- error[unresolved-attribute] zerver/views/registration.py:508:41: Type `BaseBackend` has no attribute `django_to_ldap_username`
- error[unresolved-attribute] zerver/views/registration.py:528:42: Type `BaseBackend` has no attribute `get_mapped_name`
- Found 7469 diagnostics
+ Found 7466 diagnostics

materialize (https://github.com/MaterializeInc/materialize)
- error[unresolved-attribute] misc/python/materialize/mzcompose/composition.py:654:22: Type `Exception` has no attribute `errors`
- error[unresolved-attribute] misc/python/materialize/mzcompose/composition.py:660:33: Type `Exception` has no attribute `cause`
- error[unresolved-attribute] misc/python/materialize/mzcompose/composition.py:660:45: Type `Exception` has no attribute `cause`
- Found 3222 diagnostics
+ Found 3219 diagnostics

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/dask/array/_aliases.py:167:43: Attribute `dtype` on type `int | float | complex | NestedSequence[int | float | complex] | @Todo(Support for `typing.TypeAlias`)` is possibly unbound
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/dask/array/_aliases.py:170:19: Attribute `astype` on type `int | float | complex | NestedSequence[int | float | complex] | @Todo(Support for `typing.TypeAlias`)` is possibly unbound
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/dask/array/_aliases.py:171:16: Attribute `copy` on type `int | float | complex | NestedSequence[int | float | complex] | @Todo(Support for `typing.TypeAlias`)` is possibly unbound
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/torch/_aliases.py:111:16: Attribute `dtype` on type `Unknown | int | float | complex` is possibly unbound
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/torch/_aliases.py:137:52: Attribute `dtype` on type `Unknown | int | float | complex` is possibly unbound
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/torch/_aliases.py:138:52: Attribute `dtype` on type `Unknown | int | float | complex` is possibly unbound
- warning[possibly-unbound-attribute] sklearn/externals/array_api_compat/torch/_aliases.py:213:18: Attribute `device` on type `Unknown | int | float | complex | NestedSequence[int | float | complex]` is possibly unbound
- Found 2348 diagnostics
+ Found 2341 diagnostics

scipy (https://github.com/scipy/scipy)
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/dask/array/_aliases.py:163:43: Attribute `dtype` on type `@Todo(Support for `typing.TypeAlias`) | int | float | complex | NestedSequence[int | float | complex]` is possibly unbound
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/dask/array/_aliases.py:166:19: Attribute `astype` on type `@Todo(Support for `typing.TypeAlias`) | int | float | complex | NestedSequence[int | float | complex]` is possibly unbound
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/dask/array/_aliases.py:167:16: Attribute `copy` on type `@Todo(Support for `typing.TypeAlias`) | int | float | complex | NestedSequence[int | float | complex]` is possibly unbound
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/torch/_aliases.py:109:16: Attribute `dtype` on type `Unknown | int | float | complex` is possibly unbound
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/torch/_aliases.py:132:52: Attribute `dtype` on type `Unknown | int | float | complex` is possibly unbound
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/torch/_aliases.py:133:52: Attribute `dtype` on type `Unknown | int | float | complex` is possibly unbound
- warning[possibly-unbound-attribute] scipy/_lib/array_api_compat/array_api_compat/torch/_aliases.py:203:18: Attribute `device` on type `Unknown | int | float | complex | NestedSequence[int | float | complex]` is possibly unbound
- error[missing-argument] scipy/_lib/array_api_extra/src/array_api_extra/_lib/_utils/_helpers.py:447:21: No argument provided for required parameter `protocol` of function `__reduce_ex__`
+ warning[unused-ignore-comment] scipy/_lib/array_api_extra/src/array_api_extra/_lib/_utils/_helpers.py:433:40: Unused blanket `type: ignore` directive
- Found 7249 diagnostics
+ Found 7242 diagnostics

sympy (https://github.com/sympy/sympy)
+ error[missing-argument] sympy/core/add.py:269:25: No argument provided for required parameter 2
- error[not-iterable] sympy/physics/optics/utils.py:200:41: Object of type `Unknown | MutableDenseMatrix | None` may not be iterable
- error[not-iterable] sympy/physics/optics/utils.py:386:45: Object of type `Unknown | MutableDenseMatrix | None` may not be iterable
+ error[non-subscriptable] sympy/physics/quantum/matrixutils.py:128:25: Cannot subscript object of type `numpy_ndarray` with no `__getitem__` method
+ error[non-subscriptable] sympy/physics/quantum/matrixutils.py:128:25: Cannot subscript object of type `scipy_sparse_matrix` with no `__getitem__` method
- warning[possibly-unbound-attribute] sympy/solvers/ode/ode.py:702:18: Attribute `subs` on type `list[Unknown] | Unknown` is possibly unbound
- error[unsupported-operator] sympy/stats/crv.py:421:20: Operator `-` is unsupported between objects of type `Unknown | Basic` and `Unknown | Basic`
+ error[unsupported-operator] sympy/stats/crv.py:421:20: Operator `-` is unsupported between objects of type `@Todo(map_with_boundness: intersections with negative contributions) | Basic` and `@Todo(map_with_boundness: intersections with negative contributions) | Basic`
- warning[possibly-unbound-attribute] sympy/stats/stochastic_process_types.py:1596:17: Attribute `is_diagonalizable` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] sympy/stats/stochastic_process_types.py:1598:20: Attribute `diagonalize` on type `Unknown | None` is possibly unbound
- Found 18033 diagnostics
+ Found 18031 diagnostics

@sharkdp sharkdp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice! Thank you.

@AlexWaygood
AlexWaygood enabled auto-merge (squash) June 24, 2025 10:54
@AlexWaygood
AlexWaygood merged commit 27eee5a into main Jun 24, 2025
@AlexWaygood
AlexWaygood deleted the alex/isinstance-gradual branch June 24, 2025 10:55
dcreager added a commit that referenced this pull request Jun 24, 2025
* main:
  [ty] Fix false positives when subscripting an object inferred as having an `Intersection` type (#18920)
  [`flake8-use-pathlib`] Add autofix for `PTH202` (#18763)
  [ty] Add relative import completion tests
  [ty] Clarify what "cursor" means
  [ty] Add a cursor test builder
  [ty] Enforce sort order of completions (#18917)
  [formatter] Fix missing blank lines before decorated classes in .pyi files (#18888)
  Apply fix availability and applicability when adding to `DiagnosticGuard` and remove `NoqaCode::rule` (#18834)
  py-fuzzer: allow relative executable paths (#18915)
  [ty] Change `environment.root` to accept multiple paths (#18913)
  [ty] Rename `src.root` setting to `environment.root` (#18760)
  Use file path for detecting package root (#18914)
  Consider virtual path for various server actions (#18910)
  [ty] Introduce `UnionType::try_from_elements` and `UnionType::try_map` (#18911)
  [ty] Support narrowing on `isinstance()`/`issubclass()` if the second argument is a dynamic, intersection, union or typevar type (#18900)
  [ty] Add decorator check for implicit attribute assignments (#18587)
  [`ruff`] Trigger `RUF037` for empty string and byte strings (#18862)
  [ty] Avoid duplicate diagnostic in unpacking (#18897)
  [`pyupgrade`] Extend version detection to include `sys.version_info.major` (`UP036`) (#18633)
  [`ruff`] Frozen Dataclass default should be valid (`RUF009`) (#18735)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty The ty type checker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants