[ty] Narrow bound method overloads by receiver#24707
Draft
charliermarsh wants to merge 2 commits intomainfrom
Draft
[ty] Narrow bound method overloads by receiver#24707charliermarsh wants to merge 2 commits intomainfrom
charliermarsh wants to merge 2 commits intomainfrom
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133. |
Memory usage reportSummary
Significant changesClick to expand detailed breakdownprefect
sphinx
trio
flake8
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-argument-type |
0 | 10 | 249 |
type-assertion-failure |
0 | 83 | 79 |
unsupported-operator |
0 | 82 | 0 |
no-matching-overload |
0 | 63 | 0 |
invalid-method-override |
2 | 35 | 0 |
unused-ignore-comment |
7 | 0 | 0 |
invalid-assignment |
0 | 1 | 1 |
invalid-return-type |
0 | 2 | 0 |
| Total | 9 | 276 | 329 |
Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.
Showing a random sample of 164 of 614 changes. See the HTML report for the full diff.
Raw diff sample (164 of 614 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`
- apprise/plugins/whatsapp.py:380: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["components"]` on object of type `str`
+ apprise/plugins/whatsapp.py:380: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["components"]` on object of type `str`
build (https://github.com/pypa/build)
- 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/helpers/openstack.py:300: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["random_seed"]` on object of type `str`
+ cloudinit/sources/helpers/openstack.py:300: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["random_seed"]` on object of type `str`
- tests/unittests/helpers.py:331:9 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["network"]` on object of type `str`
+ tests/unittests/helpers.py:331:9 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["network"]` 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/sources/test_cloudsigma.py:90: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["cloudinit-user-data"]` on object of type `str`
+ tests/unittests/sources/test_cloudsigma.py:90: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["cloudinit-user-data"]` on object of type `str`
- tests/unittests/sources/test_configdrive.py:645: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["mykey"]` on object of type `str`
+ tests/unittests/sources/test_configdrive.py:645: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["mykey"]` 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`
core (https://github.com/home-assistant/core)
- 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:423:18 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:423:18 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/forked_daapd/media_player.py:504: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["title"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:504: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["title"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:509: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["artist"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:509: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["artist"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:516: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["data_kind"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:516: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["data_kind"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:517: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["title"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:517: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["title"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:747: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["length_ms"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:747: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["length_ms"]` on object of type `str`
- homeassistant/components/forked_daapd/media_player.py:767: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["uri"]` on object of type `str`
+ homeassistant/components/forked_daapd/media_player.py:767: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["uri"]` on object of type `str`
- homeassistant/helpers/storage.py:460: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["data"]` on object of type `str`
+ homeassistant/helpers/storage.py:460: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["data"]` on object of type `str`
cwltool (https://github.com/common-workflow-language/cwltool)
- mypy-stubs/rdflib/namespace/__init__.pyi:38:9 error[invalid-method-override] Invalid override of method `__getitem__`: Definition is incompatible with `str.__getitem__`
- cwltool/checker.py:115: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:115: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: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:121:40 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:40 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: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["items"]` on object of type `str`
+ cwltool/main.py:310: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["items"]` on object of type `str`
- cwltool/main.py:310:58 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:58 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:32:26 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:32:26 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:48: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["id"]` on object of type `str`
+ cwltool/pack.py:48: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["id"]` on object of type `str`
- cwltool/process.py:1069:58 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["requirements"]` on object of type `str`
+ cwltool/process.py:1069:58 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["requirements"]` on object of type `str`
- cwltool/process.py:1071:37 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["requirements"]` on object of type `str`
+ cwltool/process.py:1071:37 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["requirements"]` on object of type `str`
- tests/test_examples.py:363: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["checksum"]` on object of type `str`
+ tests/test_examples.py:363: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["checksum"]` on object of type `str`
dd-trace-py (https://github.com/DataDog/dd-trace-py)
- tests/contrib/litellm/test_litellm_llmobs.py:127: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["description"]` on object of type `str`
+ tests/contrib/litellm/test_litellm_llmobs.py:127: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["description"]` on object of type `str`
- tests/contrib/litellm/test_litellm_llmobs.py:128:31 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["parameters"]` on object of type `str`
+ tests/contrib/litellm/test_litellm_llmobs.py:128:31 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["parameters"]` on object of type `str`
- 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["parts"]` 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["parts"]` on object of type `str`
- 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:386: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["location"]` on object of type `str`
+ tests/contrib/vertexai/test_vertexai_llmobs.py:386: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["location"]` on object of type `str`
- tests/contrib/vertexai/test_vertexai_llmobs.py:698: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:698: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/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:872: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:872: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/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["text"]` 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["text"]` on object of type `str`
- tests/llmobs/test_experiments.py:3727: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["tag_operations"]` on object of type `str`
+ tests/llmobs/test_experiments.py:3727: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["tag_operations"]` on object of type `str`
- tests/llmobs/test_experiments.py:3745: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["tags"]` on object of type `str`
+ tests/llmobs/test_experiments.py:3745: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["tags"]` on object of type `str`
django-stubs (https://github.com/typeddjango/django-stubs)
- django-stubs/core/files/base.pyi:58:9 error[invalid-method-override] Invalid override of method `write`: Definition is incompatible with `IO.write`
dulwich (https://github.com/dulwich/dulwich)
- dulwich/cli.py:801:9 error[invalid-method-override] Invalid override of method `write`: Definition is incompatible with `IO.write`
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`
- freqtrade/data/btanalysis/trade_parallelism.py:125:49 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:125:49 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`
- freqtrade/data/btanalysis/trade_parallelism.py:126: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["amount"]` on object of type `str`
+ freqtrade/data/btanalysis/trade_parallelism.py:126: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["amount"]` on object of type `str`
- freqtrade/rpc/telegram.py:408:44 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["open"]` on object of type `str`
+ freqtrade/rpc/telegram.py:408:44 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["open"]` on object of type `str`
- freqtrade/templates/FreqaiExampleStrategy.py:290: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["close"]` on object of type `str`
+ freqtrade/templates/FreqaiExampleStrategy.py:290: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["close"]` on object of type `str`
graphql-core (https://github.com/graphql-python/graphql-core)
- src/graphql/validation/rules/possible_type_extensions.py:48:29 error[invalid-assignment] Object of type `str | bytes` is not assignable to `str | None`
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- bson/son.py:135:9 error[invalid-method-override] Invalid override of method `setdefault`: Definition is incompatible with `MutableMapping.setdefault`
mypy (https://github.com/python/mypy)
- 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/weakref.pyi:181:9 error[invalid-method-override] Invalid override of method `update`: Definition is incompatible with `MutableMapping.update`
pandas (https://github.com/pandas-dev/pandas)
- pandas/tests/io/json/test_json_table_schema.py:677:19 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`
+ pandas/tests/io/json/test_json_table_schema.py:677:19 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-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/core/indexes/timedeltas.pyi:121:75 warning[unused-ignore-comment] Unused `ty: ignore` directive
+ pandas-stubs/core/indexes/timedeltas.pyi:147:77 warning[unused-ignore-comment] Unused `ty: ignore` directive
- tests/indexes/bool/test_add.py:56:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float]`
+ tests/indexes/bool/test_add.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/bool/test_add.py:57:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float | complex]`
+ tests/indexes/bool/test_add.py:57:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/bool/test_mul.py:39:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[bool]` and `Literal[True]`
- tests/indexes/bool/test_mul.py:47:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Index[bool]`
- tests/indexes/complex/test_add.py:55:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float | complex]`
+ tests/indexes/complex/test_add.py:55:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/complex/test_add.py:58:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float | complex]`
+ tests/indexes/complex/test_add.py:58:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/float/test_add.py:57:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float]`
+ tests/indexes/float/test_add.py:57:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/int/test_add.py:55:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/int/test_add.py:55:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
- tests/indexes/int/test_add.py:57:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float]`
+ tests/indexes/int/test_add.py:57:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/int/test_floordiv.py:36:11 error[type-assertion-failure] Type `Index[int | float]` does not match asserted type `Index[int]`
- tests/indexes/int/test_floordiv.py:44:11 error[type-assertion-failure] Type `Index[int | float]` does not match asserted type `Index[int]`
- 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:41:15 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[str]` and `Literal[True]`
- tests/indexes/str/test_mul.py:44:15 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[str]` and `float`
- tests/indexes/str/test_mul.py:51:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[1]` and `Index[str]`
- tests/indexes/str/test_mul.py:54:15 error[unsupported-operator] Operator `*` is not supported between objects of type `complex` and `Index[str]`
- tests/indexes/str/test_mul.py:67:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[str]` and `list[int]`
- tests/indexes/str/test_mul.py:72:15 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[str]` and `list[timedelta]`
- 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:81:15 error[unsupported-operator] Operator `*` is not supported between objects of type `list[timedelta]` and `Index[str]`
- tests/series/bool/test_add.py:21:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[bool]` and `Literal[True]`
- tests/series/bool/test_add.py:31:23 error[no-matching-overload] No overload of bound method `Series.add` matches arguments
- tests/series/bool/test_add.py:48:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_add.py:63:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_add.py:78:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_add.py:78:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_add.py:79:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_add.py:79:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/bool/test_add.py:95:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_add.py:95:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_add.py:96:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_add.py:96:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- 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_mul.py:48:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Series[bool]`
- tests/series/bool/test_mul.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- tests/series/bool/test_mul.py:64:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
- 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:91:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_add.py:91:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:93:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_add.py:93:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:115:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_add.py:115:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:174:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_mul.py:174:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/float/test_add.py:80:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:80: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/int/test_add.py:79:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/int/test_add.py:79:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:80:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
+ tests/series/int/test_add.py:80:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- 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/int/test_floordiv.py:36:11 error[type-assertion-failure] Type `Series[int | float]` does not match asserted type `Series[int]`
- 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:40:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- 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_add.py:117:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[str]`
+ tests/series/str/test_add.py:117:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_mul.py:51:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_mul.py:60:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_mul.py:69:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/str/test_mul.py:72:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/str/test_mul.py:103:23 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/str/test_mul.py:106:9 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/str/test_mul.py:111:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/str/test_mul.py:112:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_mul.py:115:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/str/test_mul.py:117:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- 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_floordiv.py:51:23 error[unsupported-operator] Operator `//` is not supported between objects of type `timedelta` and `Series[Timedelta]`
- tests/series/timedelta/test_floordiv.py:68:11 error[type-assertion-failure] Type `Series[Timedelta]` does not match asserted type `Series[int]`
- tests/series/timedelta/test_floordiv.py:196:11 error[type-assertion-failure] Type `Series[Timedelta]` does not match asserted type `Series[int]`
- tests/series/timedelta/test_mul.py:36:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Series[Timedelta]` and `float`
- tests/series/timedelta/test_mul.py:41:15 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:42:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[1]` 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:23 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/timedelta/test_mul.py:52:9 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/timedelta/test_mul.py:55:9 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/timedelta/test_mul.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- 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:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:75:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:76:23 error[unsupported-operator] Operator `*` is not supported between objects of type `list[int | float]` and `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:85:9 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/timedelta/test_mul.py:89:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/timedelta/test_mul.py:90: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:50:23 error[unsupported-operator] Operator `/` is not supported between objects of type `timedelta` and `Series[Timedelta]`
- tests/series/timedelta/test_truediv.py:72:11 error[type-assertion-failure] Type `Series[Timedelta]` does not match asserted type `Series[int | float]`
- tests/series/timedelta/test_truediv.py:80: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]`
- tests/series/timedelta/test_truediv.py:234:11 error[type-assertion-failure] Type `Series[Timedelta]` does not match asserted type `Series[int | float]`
- tests/series/timedelta/test_truediv.py:242:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
pandera (https://github.com/pandera-dev/pandera)
- pandera/api/pandas/model.py:271: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["name"]` on object of type `str`
+ pandera/api/pandas/model.py:271: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["name"]` on object of type `str`
pip (https://github.com/pypa/pip)
- src/pip/_vendor/rich/_null_file.py:59:9 error[invalid-method-override] Invalid override of method `write`: Definition is incompatible with `IO.write`
- src/pip/_vendor/urllib3/_collections.py:275:9 error[invalid-method-override] Invalid override of method `setdefault`: Definition is incompatible with `MutableMapping.setdefault`
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/prefect_dbt/cloud/jobs.py:626:31 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["results"]` on object of type `str`
+ src/integrations/prefect-dbt/prefect_dbt/cloud/jobs.py:626:31 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["results"]` on object of type `str`
pyodide (https://github.com/pyodide/pyodide)
- src/py/_pyodide/_core_docs.py:1191:9 error[invalid-method-override] Invalid override of method `update`: Definition is incompatible with `MutableMapping.update`
rich (https://github.com/Textualize/rich)
- rich/_null_file.py:59:9 error[invalid-method-override] Invalid override of method `write`: Definition is incompatible with `IO.write`
schema_salad (https://github.com/common-workflow-language/schema_salad)
- schema_salad/jsonld_context.py:211: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 `str` on object of type `str`
+ schema_salad/jsonld_context.py:211: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 `str` 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`
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`
- src/scikit_build_core/settings/skbuild_schema.py:81: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["metadata"]` on object of type `str`
+ src/scikit_build_core/settings/skbuild_schema.py:81: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["metadata"]` on object of type `str`
scipy (https://github.com/scipy/scipy)
- scipy/optimize/tests/test__shgo.py:1225: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["catol"]` on object of type `str`
+ scipy/optimize/tests/test__shgo.py:1225: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["catol"]` on object of type `str`
scipy-stubs (https://github.com/scipy/scipy-stubs)
+ scipy-stubs/sparse/_dok.pyi:157:9 error[invalid-method-override] Invalid override of method `fromkeys`: Definition is incompatible with `dict.fromkeys`
+ scipy-stubs/sparse/_dok.pyi:739:185 error[unused-ignore-comment] Unused `ty: ignore` directive
spack (https://github.com/spack/spack)
- lib/spack/spack/vendor/markupsafe/__init__.py:198:9 error[invalid-method-override] Invalid override of method `rpartition`: Definition is incompatible with `str.rpartition`
sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/util/matching.py:112:12 error[invalid-return-type] Return type does not match returned value: expected `list[str]`, found `list[_T@filter]`
sympy (https://github.com/sympy/sympy)
- sympy/printing/aesaracode.py:219: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 `tuple[str, str]` on object of type `str`
+ sympy/printing/aesaracode.py:219: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 `tuple[str, str]` on object of type `str`
- sympy/utilities/_compilation/runners.py:128:42 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `Iterable[str | Buffer]`, found `Unknown | None`
- sympy/utilities/_compilation/runners.py:130:30 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `(str | Buffer, /) -> Match[str] | None | Match[bytes]`, found `Overload[(string: str, pos: int = 0, endpos: int = ...) -> Match[str] | None, (string: Buffer, pos: int = 0, endpos: int = ...) -> Match[bytes] | None, (string: str, pos: int = 0, endpos: int = ...) -> Match[str] | None]`
+ sympy/utilities/_compilation/runners.py:130:43 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `Iterable[str]`, found `Unknown | None`
- sympy/utilities/_compilation/runners.py:130:43 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `Iterable[str | Buffer]`, found `Unknown | None`
- sympy/utilities/_compilation/runners.py:138:45 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `Iterable[str | Buffer]`, found `Unknown | None`
urllib3 (https://github.com/urllib3/urllib3)
- src/urllib3/_collections.py:275:9 error[invalid-method-override] Invalid override of method `setdefault`: Definition is incompatible with `MutableMapping.setdefault`
xarray (https://github.com/pydata/xarray)
- 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 `int` 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 `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]]`
Merging this PR will improve performance by 19.83%
Performance Changes
Comparing Footnotes
|
89fa69a to
9b9bf8e
Compare
|
1d57f74 to
fd58449
Compare
fd58449 to
d230623
Compare
d230623 to
5265a0b
Compare
5265a0b to
6a85bad
Compare
6a85bad to
c77ed0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.