[ty] Narrow bound method overloads by receiver#24707
[ty] Narrow bound method overloads by receiver#24707charliermarsh wants to merge 16 commits intomainfrom
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 88.62%. The percentage of expected errors that received a diagnostic held steady at 84.63%. The number of fully passing files held steady at 84/134. |
Memory usage reportSummary
Significant changesClick to expand detailed breakdownprefect
sphinx
trio
flake8
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-argument-type |
1 | 11 | 284 |
type-assertion-failure |
0 | 161 | 80 |
unsupported-operator |
0 | 126 | 0 |
no-matching-overload |
9 | 97 | 0 |
invalid-method-override |
27 | 40 | 0 |
unused-ignore-comment |
12 | 0 | 0 |
invalid-assignment |
0 | 1 | 1 |
invalid-return-type |
0 | 2 | 0 |
| Total | 49 | 438 | 365 |
Large timing changes:
| Project | Old Time | New Time | Change |
|---|---|---|---|
colour |
2.20s | 5.03s | +128% |
pandas-stubs |
11.95s | 2.70s | -77% |
Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.
Showing a random sample of 160 of 852 changes. See the HTML report for the full diff.
Raw diff sample (160 of 852 changes)
apprise (https://github.com/caronc/apprise)
- apprise/plugins/notificationapi.py:828:17 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["email"]` on object of type `str`
+ apprise/plugins/notificationapi.py:828:17 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["email"]` on object of type `str`
bidict (https://github.com/jab/bidict)
- bidict/_bidict.py:158:9 error[invalid-method-override] Invalid override of method `update`: Definition is incompatible with `MutableMapping.update`
build (https://github.com/pypa/build)
- tests/test_integration.py:149:17 error[no-matching-overload] No overload of constructor `filter.__new__` matches arguments
- tests/test_integration.py:150:17 error[no-matching-overload] No overload of constructor `filter.__new__` matches arguments
cloud-init (https://github.com/canonical/cloud-init)
- cloudinit/netinfo.py:596:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["ip"]` on object of type `str`
+ cloudinit/netinfo.py:596:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["ip"]` on object of type `str`
- cloudinit/sources/DataSourceNoCloud.py:172:24 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["seedfrom"]` on object of type `str`
+ cloudinit/sources/DataSourceNoCloud.py:172:24 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["seedfrom"]` on object of type `str`
- cloudinit/sources/DataSourceOracle.py:371:27 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["macAddr"]` on object of type `str`
+ cloudinit/sources/DataSourceOracle.py:371:27 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["macAddr"]` on object of type `str`
- cloudinit/sources/DataSourceVMware.py:1027:20 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["ip"]` on object of type `str`
+ cloudinit/sources/DataSourceVMware.py:1027:20 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["ip"]` on object of type `str`
- cloudinit/sources/helpers/openstack.py:341:33 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["meta"]` on object of type `str`
+ cloudinit/sources/helpers/openstack.py:341:33 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["meta"]` on object of type `str`
- tests/unittests/sources/test_cloudsigma.py:70:13 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["ssh_public_key"]` on object of type `str`
+ tests/unittests/sources/test_cloudsigma.py:70:13 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["ssh_public_key"]` on object of type `str`
- tests/unittests/test_ds_identify.py:1313:35 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["usr/lib/vmware-tools/plugins/vmsvc/libdeployPkgPlugin.so"]` on object of type `str`
+ tests/unittests/test_ds_identify.py:1313:35 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["usr/lib/vmware-tools/plugins/vmsvc/libdeployPkgPlugin.so"]` on object of type `str`
- tests/unittests/test_ds_identify.py:1358:33 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["usr/lib/vmware-tools/plugins/vmsvc/libdeployPkgPlugin.so"]` on object of type `str`
+ tests/unittests/test_ds_identify.py:1358:33 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["usr/lib/vmware-tools/plugins/vmsvc/libdeployPkgPlugin.so"]` on object of type `str`
colour (https://github.com/colour-science/colour)
+ colour/io/luts/lut.py:638:26 error[no-matching-overload] No overload matches arguments
+ colour/utilities/array.py:547:25 error[no-matching-overload] No overload matches arguments
+ colour/utilities/array.py:547:25 error[no-matching-overload] No overload matches arguments
core (https://github.com/home-assistant/core)
- homeassistant/components/forked_daapd/media_player.py:414:34 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["selected"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:414:34 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["selected"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:415:32 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["volume"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:415:32 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["volume"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:630:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["id"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:630:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["id"]` on object of type `str`
- homeassistant/components/pterodactyl/api.py:92:41 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["attributes"]` on object of type `str`
+ homeassistant/components/pterodactyl/api.py:92:41 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["attributes"]` on object of type `str`
- homeassistant/helpers/storage.py:455:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["version"]` on object of type `str`
+ homeassistant/helpers/storage.py:455:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["version"]` on object of type `str`
- homeassistant/helpers/storage.py:458:24 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["version"]` on object of type `str`
+ homeassistant/helpers/storage.py:458:24 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["version"]` on object of type `str`
cwltool (https://github.com/common-workflow-language/cwltool)
- cwltool/checker.py:121:12 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["type"]` on object of type `str`
+ cwltool/checker.py:121:12 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["type"]` on object of type `str`
- cwltool/checker.py:133:39 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["type"]` on object of type `str`
+ cwltool/checker.py:133:39 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["type"]` on object of type `str`
- cwltool/command_line_tool.py:642:60 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["entryname"]` on object of type `str`
+ cwltool/command_line_tool.py:642:60 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["entryname"]` on object of type `str`
- cwltool/main.py:309:16 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["type"]` on object of type `str`
+ cwltool/main.py:309:16 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["type"]` on object of type `str`
- cwltool/main.py:310:85 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["items"]` on object of type `str`
+ cwltool/main.py:310:85 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["items"]` on object of type `str`
- cwltool/main.py:318:16 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["type"]` on object of type `str`
+ cwltool/main.py:318:16 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["type"]` on object of type `str`
- cwltool/pack.py:30:38 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["run"]` on object of type `str`
+ cwltool/pack.py:30:38 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["run"]` on object of type `str`
- cwltool/pack.py:47:38 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["id"]` on object of type `str`
+ cwltool/pack.py:47:38 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["id"]` on object of type `str`
- cwltool/pack.py:47:38 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["name"]` on object of type `str`
+ cwltool/pack.py:47:38 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["name"]` on object of type `str`
- cwltool/subgraph.py:236:36 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["id"]` on object of type `str`
+ cwltool/subgraph.py:236:36 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["id"]` on object of type `str`
dd-trace-py (https://github.com/DataDog/dd-trace-py)
- tests/contrib/vertexai/test_vertexai_llmobs.py:251:33 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["text"]` on object of type `str`
+ tests/contrib/vertexai/test_vertexai_llmobs.py:251:33 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["text"]` on object of type `str`
- tests/contrib/vertexai/test_vertexai_llmobs.py:811:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["text"]` on object of type `str`
+ tests/contrib/vertexai/test_vertexai_llmobs.py:811:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["text"]` on object of type `str`
- tests/contrib/vertexai/test_vertexai_llmobs.py:829:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["text"]` on object of type `str`
+ tests/contrib/vertexai/test_vertexai_llmobs.py:829:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["text"]` on object of type `str`
- tests/contrib/vertexai/test_vertexai_llmobs.py:844:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["text"]` on object of type `str`
+ tests/contrib/vertexai/test_vertexai_llmobs.py:844:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["text"]` on object of type `str`
- tests/contrib/vertexai/test_vertexai_llmobs.py:908:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["parts"]` on object of type `str`
+ tests/contrib/vertexai/test_vertexai_llmobs.py:908:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["parts"]` on object of type `str`
- tests/llmobs/test_experiments.py:3729:29 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["tag_operations"]` on object of type `str`
+ tests/llmobs/test_experiments.py:3729:29 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["tag_operations"]` on object of type `str`
- tests/llmobs/test_experiments.py:3758:12 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["id"]` on object of type `str`
+ tests/llmobs/test_experiments.py:3758:12 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["id"]` on object of type `str`
- tests/llmobs/test_experiments.py:4236:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["tag_operations"]` on object of type `str`
+ tests/llmobs/test_experiments.py:4236:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["tag_operations"]` on object of type `str`
- tests/llmobs/test_experiments.py:4237:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["tag_operations"]` on object of type `str`
+ tests/llmobs/test_experiments.py:4237:25 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["tag_operations"]` on object of type `str`
- tests/llmobs/test_experiments.py:4667:12 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["id"]` on object of type `str`
+ tests/llmobs/test_experiments.py:4667:12 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["id"]` on object of type `str`
freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/data/btanalysis/trade_parallelism.py:121:46 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["order_filled_timestamp"]` on object of type `str`
+ freqtrade/data/btanalysis/trade_parallelism.py:121:46 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["order_filled_timestamp"]` on object of type `str`
ibis (https://github.com/ibis-project/ibis)
- ibis/backends/__init__.py:1102:23 error[no-matching-overload] No overload of constructor `filter.__new__` matches arguments
mypy (https://github.com/python/mypy)
- mypy/dmypy_util.py:107:9 error[invalid-method-override] Invalid override of method `write`: Definition is incompatible with `IO.write`
- mypy/typeshed/stdlib/codecs.pyi:302:9 error[invalid-method-override] Invalid override of method `writelines`: Definition is incompatible with `IO.writelines`
- mypy/typeshed/stdlib/os/__init__.pyi:725:9 error[invalid-method-override] Invalid override of method `setdefault`: Definition is incompatible with `MutableMapping.setdefault`
openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/core/observations.py:614:47 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["name"]` on object of type `str`
+ openlibrary/core/observations.py:614:47 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["name"]` on object of type `str`
- openlibrary/core/observations.py:706:35 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["name"]` on object of type `str`
+ openlibrary/core/observations.py:706:35 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["name"]` on object of type `str`
pandas (https://github.com/pandas-dev/pandas)
- pandas/io/sas/sas_xport.py:478:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[float64]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[float64]], (key: str, /) -> ndarray[tuple[Any, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[Any, ...], Unknown]]` cannot be called with key of type `str` on object of type `ndarray[tuple[Any, ...], dtype[float64]]`
+ pandas/io/sas/sas_xport.py:478:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[float64]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[float64]]]` cannot be called with key of type `str` on object of type `ndarray[tuple[Any, ...], dtype[float64]]`
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/core/indexes/datetimes.pyi:79:48 warning[unused-ignore-comment] Unused `ty: ignore` directive
+ pandas-stubs/core/indexes/datetimes.pyi:82:49 warning[unused-ignore-comment] Unused `ty: ignore` directive
- tests/indexes/bool/test_add.py:54:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_add.py:54:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[bool]`
- tests/indexes/bool/test_mul.py:47:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[bool]`
- tests/indexes/complex/test_add.py:22:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/complex/test_add.py:23:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Index[int | float | complex]` and `Literal[1]`
- tests/indexes/complex/test_add.py:24:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/complex/test_mul.py:40:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[int | float | complex]` and `Literal[True]`
- tests/indexes/complex/test_mul.py:48:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Index[int | float | complex]`
- tests/indexes/complex/test_mul.py:49:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/float/test_add.py:27:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[True]` and `Index[int | float]`
- tests/indexes/float/test_add.py:58:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float | complex]`
+ tests/indexes/float/test_add.py:58:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/float/test_mul.py:48:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_mul.py:48:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Index[int | float]`
- tests/indexes/int/test_add.py:56:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/int/test_add.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
- tests/indexes/int/test_add.py:58:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float | complex]`
+ tests/indexes/int/test_add.py:58:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/str/test_add.py:64:9 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Never`
+ tests/indexes/str/test_add.py:64:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`
- tests/indexes/str/test_add.py:65:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/str/test_add.py:65:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[str]`
- tests/indexes/str/test_mul.py:75:15 error[unsupported-operator] Operator `*` is not supported between objects of type `list[bool]` and `Index[str]`
- tests/indexes/str/test_mul.py:79:15 error[unsupported-operator] Operator `*` is not supported between objects of type `list[int | float | complex]` and `Index[str]`
- tests/indexes/str/test_mul.py:80:15 error[unsupported-operator] Operator `*` is not supported between objects of type `list[datetime]` and `Index[str]`
- tests/series/bool/test_add.py:36:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_add.py:36:23 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/bool/test_add.py:48:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[bool]` and `list[bool]`
- tests/series/bool/test_add.py:63:23 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/bool/test_add.py:100:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_add.py:100:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_add.py:102:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
+ tests/series/bool/test_add.py:102:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/bool/test_mul.py:64:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/complex/test_add.py:33:23 error[no-matching-overload] No overload of bound method `Series.add` matches arguments
- tests/series/complex/test_add.py:37:21 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/complex/test_add.py:40:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:55:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[int | float | complex]` and `list[int]`
- tests/series/complex/test_add.py:57:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:57:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[int | float | complex]` and `list[int | float | complex]`
- tests/series/complex/test_add.py:65:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:66:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:70:21 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/complex/test_add.py:73:21 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/complex/test_add.py:112:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_add.py:112:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:49:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:50:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:57:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/float/test_add.py:49:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:55:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:59:23 error[no-matching-overload] No overload of bound method `Series.add` matches arguments
- tests/series/float/test_add.py:63:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:64:23 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/float/test_add.py:65:23 error[no-matching-overload] No overload of bound method `Series.radd` matches arguments
- tests/series/float/test_add.py:81:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/float/test_add.py:81:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/float/test_add.py:95:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:95:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:100:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:100:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/float/test_mul.py:40:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/int/test_add.py:95:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/int/test_add.py:95:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:98:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/int/test_add.py:98:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/int/test_add.py:101:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/int/test_add.py:101:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:104:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/int/test_add.py:104:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/str/test_add.py:32:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[str]` and `Literal["right"]`
- tests/series/str/test_add.py:81:15 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_add.py:102:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Never`
+ tests/series/str/test_add.py:102:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`
- tests/series/str/test_mul.py:53:15 error[unsupported-operator] Operator `*` is not supported between objects of type `float` and `Series[str]`
- tests/series/str/test_mul.py:55:15 error[unsupported-operator] Operator `*` is not supported between objects of type `datetime` and `Series[str]`
- tests/series/str/test_mul.py:68:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/str/test_mul.py:97:15 error[unsupported-operator] Operator `*` is not supported between objects of type `list[int | float | complex]` and `Series[str]`
- tests/series/str/test_mul.py:152:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_mul.py:193:15 error[unsupported-operator] Operator `*` is not supported between objects of type `DatetimeIndex` and `Series[str]`
- tests/series/timedelta/test_mul.py:42:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:43:23 error[unsupported-operator] Operator `*` is not supported between objects of type `float` and `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:48:9 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/timedelta/test_mul.py:50:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:56:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/timedelta/test_mul.py:59:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/timedelta/test_mul.py:68:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Series[Timedelta]` and `list[int]`
- tests/series/timedelta/test_mul.py:69:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:75:23 error[unsupported-operator] Operator `*` is not supported between objects of type `list[int]` and `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:82:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:83:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:88:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/timedelta/test_mul.py:89:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/timedelta/test_mul.py:122:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_truediv.py:88:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/timedelta/test_truediv.py:226:11 error[type-assertion-failure] Type `Series[Timedelta]` does not match asserted type `Series[int | float]`
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/infrastructure/provisioners/container_instance.py:347:24 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["displayName"]` on object of type `str`
+ src/prefect/infrastructure/provisioners/container_instance.py:347:24 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["displayName"]` on object of type `str`
- src/prefect/infrastructure/provisioners/container_instance.py:413:20 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["tenant"]` on object of type `str`
+ src/prefect/infrastructure/provisioners/container_instance.py:413:20 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["tenant"]` on object of type `str`
pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_schema_gather.py:159:29 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["schema"]` on object of type `str`
+ pydantic/_internal/_schema_gather.py:159:29 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["schema"]` on object of type `str`
rich (https://github.com/Textualize/rich)
- rich/_null_file.py:39:9 error[invalid-method-override] Invalid override of method `writelines`: Definition is incompatible with `IO.writelines`
schema_salad (https://github.com/common-workflow-language/schema_salad)
- schema_salad/ref_resolver.py:1164:41 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `str` on object of type `str`
+ schema_salad/ref_resolver.py:1164:41 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `str` on object of type `str`
- schema_salad/schema.py:434:30 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["name"]` on object of type `str`
+ schema_salad/schema.py:434:30 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["name"]` on object of type `str`
- schema_salad/schema.py:543:56 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["name"]` on object of type `str`
+ schema_salad/schema.py:543:56 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["name"]` on object of type `str`
- schema_salad/schema.py:558:20 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["name"]` on object of type `str`
+ schema_salad/schema.py:558:20 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["name"]` on object of type `str`
- schema_salad/schema.py:564:21 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["fields"]` on object of type `str`
+ schema_salad/schema.py:564:21 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["fields"]` on object of type `str`
- schema_salad/schema.py:564:21 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["type"]` on object of type `str`
+ schema_salad/schema.py:564:21 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["type"]` on object of type `str`
- schema_salad/schema.py:564:21 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["values"]` on object of type `str`
+ schema_salad/schema.py:564:21 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["values"]` on object of type `str`
scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/settings/skbuild_schema.py:65:5 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["generate"]` on object of type `str`
+ src/scikit_build_core/settings/skbuild_schema.py:65:5 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["generate"]` on object of type `str`
scipy (https://github.com/scipy/scipy)
- subprojects/highs/highs/highspy/highs.py:1200:56 error[invalid-assignment] Object of type `ndarray[tuple[object, ...], dtype[object]]` is not assignable to `ndarray[Any, dtype[object_]]`
+ subprojects/highs/highs/highspy/highs.py:1200:56 error[invalid-assignment] Object of type `Iterable[highs_var | highs_linear_expression] & ndarray[tuple[object, ...], dtype[object]]` is not assignable to `ndarray[Any, dtype[object_]]`
scipy-stubs (https://github.com/scipy/scipy-stubs)
+ scipy-stubs/sparse/_dok.pyi:721:118 error[unused-ignore-comment] Unused `ty: ignore` directive
+ scipy-stubs/stats/_distribution_infrastructure.pyi:341:9 error[invalid-method-override] Invalid override of method `mode`: Definition is incompatible with `_ProbabilityDistribution.mode`
+ scipy-stubs/stats/_distribution_infrastructure.pyi:387:9 error[invalid-method-override] Invalid override of method `mean`: Definition is incompatible with `_ProbabilityDistribution.mean`
+ scipy-stubs/stats/_distribution_infrastructure.pyi:580:9 error[invalid-method-override] Invalid override of method `logpdf`: Definition is incompatible with `_ProbabilityDistribution.logpdf`
+ scipy-stubs/stats/_distribution_infrastructure.pyi:845:9 error[invalid-method-override] Invalid override of method `logcdf`: Definition is incompatible with `_ProbabilityDistribution.logcdf`
+ scipy-stubs/stats/_distribution_infrastructure.pyi:938:9 error[invalid-method-override] Invalid override of method `ccdf`: Definition is incompatible with `_ProbabilityDistribution.ccdf`
- tests/spatial/test__rigid_transform.pyi:61:1 error[type-assertion-failure] Type `RigidTransform[tuple[()]] | RigidTransform[tuple[int]]` does not match asserted type `RigidTransform[tuple[()]]`
+ tests/spatial/test__rigid_transform.pyi:61:1 error[type-assertion-failure] Type `RigidTransform[tuple[Any, ...]]` does not match asserted type `RigidTransform[tuple[()]]`
- tests/spatial/test__rigid_transform.pyi:62:1 error[type-assertion-failure] Type `RigidTransform[tuple[()]] | RigidTransform[tuple[int]]` does not match asserted type `RigidTransform[tuple[int]]`
+ tests/spatial/test__rigid_transform.pyi:62:1 error[type-assertion-failure] Type `RigidTransform[tuple[Any, ...]] | RigidTransform[tuple[int]]` does not match asserted type `RigidTransform[tuple[int]]`
setuptools (https://github.com/pypa/setuptools)
- setuptools/_distutils/util.py:154:43 error[invalid-argument-type] Method `__getitem__` of type `(Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]) | (Overload[(key: SupportsIndex, /) -> int, (key: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> bytes])` cannot be called with key of type `slice[Literal[1], None, None]` on object of type `AnyStr@change_root`
+ setuptools/_distutils/util.py:154:43 error[invalid-argument-type] Method `__getitem__` of type `(Overload[]) | (Overload[])` cannot be called with key of type `slice[Literal[1], None, None]` on object of type `AnyStr@change_root`
- setuptools/tests/test_editable_install.py:967:5 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["mypkg"]` on object of type `str`
+ setuptools/tests/test_editable_install.py:967:5 error[invalid-argument-type] Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["mypkg"]` on object of type `str`
spack (https://github.com/spack/spack)
- lib/spack/spack/vendor/markupsafe/__init__.py:193:9 error[invalid-method-override] Invalid override of method `partition`: Definition is incompatible with `str.partition`
xarray (https://github.com/pydata/xarray)
- xarray/core/groupby.py:963:24 error[invalid-argument-type] Method `__getitem__` of type `(bound method T_Xarray@GroupBy.__getitem__(key: Any) -> T_Xarray@GroupBy) | (Overload[(key: Hashable) -> DataArray, (key: Iterable[Hashable]) -> T_Xarray@GroupBy])` cannot be called with key of type `Unknown` on object of type `T_Xarray@GroupBy`
+ xarray/core/groupby.py:963:24 error[invalid-argument-type] Method `__getitem__` of type `(bound method T_Xarray@GroupBy.__getitem__(key: Any) -> T_Xarray@GroupBy) | (Overload[])` cannot be called with key of type `Unknown` on object of type `T_Xarray@GroupBy`
- xarray/core/indexing.py:406:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[object]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[object]], (key: str, /) -> ndarray[tuple[object, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[object, ...], Unknown]]` cannot be called with key of type `integer[Any]` on object of type `ndarray[tuple[object, ...], dtype[object]]`
+ xarray/core/indexing.py:406:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[object]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[object]]]` cannot be called with key of type `ndarray[Any, dtype[integer[Any]]]` on object of type `ndarray[tuple[object, ...], dtype[object]]`
- xarray/core/indexing.py:406:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[object]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[object]], (key: str, /) -> ndarray[tuple[object, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[object, ...], Unknown]]` cannot be called with key of type `ndarray[Any, dtype[integer[Any]]]` on object of type `ndarray[tuple[object, ...], dtype[object]]`
- xarray/core/indexing.py:406:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[object]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[object]], (key: str, /) -> ndarray[tuple[object, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[object, ...], Unknown]]` cannot be called with key of type `ndarray[Any, dtype[integer[Any]]]` on object of type `ndarray[tuple[object, ...], dtype[object]]`
- xarray/core/indexing.py:406:19 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[object]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[object]], (key: str, /) -> ndarray[tuple[object, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[object, ...], Unknown]]` cannot be called with key of type `slice[Any, Any, Any]` on object of type `ndarray[tuple[object, ...], dtype[object]]`
- xarray/plot/facetgrid.py:241:26 error[invalid-argument-type] Method `__getitem__` of type `(Overload[(key: Hashable) -> DataArray, (key: Iterable[Hashable]) -> T_DataArrayOrSet@FacetGrid]) | (bound method T_DataArrayOrSet@FacetGrid.__getitem__(key: Any) -> T_DataArrayOrSet@FacetGrid)` cannot be called with key of type `Hashable` on object of type `T_DataArrayOrSet@FacetGrid`
+ xarray/plot/facetgrid.py:241:26 error[invalid-argument-type] Method `__getitem__` of type `(Overload[]) | (bound method T_DataArrayOrSet@FacetGrid.__getitem__(key: Any) -> T_DataArrayOrSet@FacetGrid)` cannot be called with key of type `Hashable` on object of type `T_DataArrayOrSet@FacetGrid`
Merging this PR will degrade performance by 9.81%
Performance Changes
Comparing Footnotes
|
89fa69a to
9b9bf8e
Compare
|
1d57f74 to
fd58449
Compare
fd58449 to
d230623
Compare
26c456e to
ba61691
Compare
7f009ab to
d6274ae
Compare
6b84710 to
99db257
Compare
|
I'm out of ideas on how to fix this |
99db257 to
8c41100
Compare
But we can eliminate it with salsa caching, at some memory cost? What does it require caching? |
8c41100 to
b69eae5
Compare
b69eae5 to
0493805
Compare
| PathBounds::default_solve(self.db, self.constraints, typevar, lower, upper) | ||
| }, | ||
| ) { | ||
| let solutions = match set.solutions(self.db, self.constraints) { |
There was a problem hiding this comment.
I think this is equivalent? But it reduced the regression from 50% to 10%.
f31d286 to
9cb078c
Compare
Summary
Given:
On main, we treat
Base().convertas if both overloads are still possible, including the overload that requiresself: "Child".After this PR:
So
Base().convert("x")is no longer considered valid via narrowing on the actual receiver type.Closes astral-sh/ty#2693.
Closes astral-sh/ty#2612.