Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the type of __path__ from Iterable[str] to `MutableSequen… #10062

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

erictraut
Copy link
Collaborator

…ce[str]`. Both are correct, but the latter is more precise. This addresses #10058.

…ce[str]`. Both are correct, but the latter is more precise. This addresses #10058.
Copy link
Contributor

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

sympy (https://github.com/sympy/sympy)
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/matchpy_connector.py:288:16 - error: Type "Basic" is not assignable to declared type "Expr"
+     "Basic" is not assignable to "Expr" (reportAssignmentType)
- 33231 errors, 72 warnings, 0 informations 
+ 33232 errors, 72 warnings, 0 informations 

comtypes (https://github.com/enthought/comtypes)
-   /tmp/mypy_primer/projects/comtypes/comtypes/client/_code_cache.py:108:58 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 489 errors, 16 warnings, 0 informations 
+ 488 errors, 16 warnings, 0 informations 

core (https://github.com/home-assistant/core)
-   /tmp/mypy_primer/projects/core/homeassistant/loader.py:412:12 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/core/homeassistant/components/system_log/__init__.py:300:22 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/core/homeassistant/components/zha/helpers.py:987:26 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 66512 errors, 294 warnings, 0 informations 
+ 66509 errors, 294 warnings, 0 informations 

hydpy (https://github.com/hydpy-dev/hydpy)
-   /tmp/mypy_primer/projects/hydpy/prepare_build.py:186:22 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/__init__.py:266:26 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/auxs/smoothtools.py:268:12 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/aliastools.py:160:22 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/aliastools.py:212:29 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/autodoctools.py:1552:19 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/autodoctools.py:1582:19 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/modeltools.py:3574:13 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:974:20 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:1311:30 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:2104:19 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:2434:19 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:2435:21 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:2437:49 - error: No overloads for "join" match the provided arguments (reportCallIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/core/testtools.py:2437:62 - error: Argument of type "Unknown | str | None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "Unknown | str | None" is not assignable to type "StrPath"
-       Type "None" is not assignable to type "StrPath"
-         "None" is not assignable to "str"
-         "None" is incompatible with protocol "PathLike[str]"
-           "__fspath__" is not present (reportArgumentType)
- /tmp/mypy_primer/projects/hydpy/hydpy/cythons/__init__.py
-   /tmp/mypy_primer/projects/hydpy/hydpy/cythons/__init__.py:13:20 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/cythons/modelutils.py:657:16 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/cythons/modelutils.py:2267:26 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- /tmp/mypy_primer/projects/hydpy/hydpy/data/__init__.py
-   /tmp/mypy_primer/projects/hydpy/hydpy/data/__init__.py:17:25 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/docs/prepare.py:48:17 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/docs/prepare.py:57:19 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/docs/prepare.py:173:27 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/docs/prepare.py:187:25 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/docs/prepare.py:200:15 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/docs/sphinx/projectstructure_extension.py:46:34 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/exe/servertools.py:2277:21 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/exe/xmltools.py:552:29 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/exe/xmltools.py:2392:21 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/exe/xmltools.py:2444:27 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/exe/xmltools.py:2460:27 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- /tmp/mypy_primer/projects/hydpy/hydpy/tests/check_consistency.py
-   /tmp/mypy_primer/projects/hydpy/hydpy/tests/check_consistency.py:13:16 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/hydpy/hydpy/tests/run_doctests.py:108:17 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 1366 errors, 48 warnings, 0 informations 
+ 1334 errors, 48 warnings, 0 informations 

ignite (https://github.com/pytorch/ignite)
-   /tmp/mypy_primer/projects/ignite/tests/ignite/distributed/test_launcher.py:49:44 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 2623 errors, 16 warnings, 0 informations 
+ 2622 errors, 16 warnings, 0 informations 

pylint (https://github.com/pycqa/pylint)
- /tmp/mypy_primer/projects/pylint/pylint/checkers/__init__.py
-   /tmp/mypy_primer/projects/pylint/pylint/checkers/__init__.py:130:30 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 247 errors, 0 warnings, 0 informations 
+ 246 errors, 0 warnings, 0 informations 

scrapy (https://github.com/scrapy/scrapy)
- /tmp/mypy_primer/projects/scrapy/scrapy/commands/genspider.py
-   /tmp/mypy_primer/projects/scrapy/scrapy/commands/genspider.py:220:56 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- /tmp/mypy_primer/projects/scrapy/scrapy/commands/startproject.py
-   /tmp/mypy_primer/projects/scrapy/scrapy/commands/startproject.py:137:56 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/scrapy/tests/test_commands.py:227:23 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/scrapy/tests/test_commands.py:243:23 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/scrapy/tests/test_commands.py:282:23 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/scrapy/tests/test_commands.py:331:23 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
-   /tmp/mypy_primer/projects/scrapy/tests/test_commands.py:397:23 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 2003 errors, 113 warnings, 0 informations 
+ 1996 errors, 113 warnings, 0 informations 

cloud-init (https://github.com/canonical/cloud-init)
-   /tmp/mypy_primer/projects/cloud-init/tests/integration_tests/clouds.py:295:26 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 1436 errors, 97 warnings, 0 informations 
+ 1435 errors, 97 warnings, 0 informations 

porcupine (https://github.com/Akuli/porcupine)
- /tmp/mypy_primer/projects/porcupine/porcupine/pluginloader.py
-   /tmp/mypy_primer/projects/porcupine/porcupine/pluginloader.py:205:82 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- /tmp/mypy_primer/projects/porcupine/porcupine/images/__init__.py
-   /tmp/mypy_primer/projects/porcupine/porcupine/images/__init__.py:29:19 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- /tmp/mypy_primer/projects/porcupine/porcupine/plugins/__init__.py
-   /tmp/mypy_primer/projects/porcupine/porcupine/plugins/__init__.py:7:10 - error: Cannot access attribute "insert" for class "Iterable[str]"
-     Attribute "insert" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/porcupine/porcupine/plugins/aboutdialog.py
-   /tmp/mypy_primer/projects/porcupine/porcupine/plugins/aboutdialog.py:149:30 - error: "__getitem__" method not defined on type "Iterable[str]" (reportIndexIssue)
- 32 errors, 25 warnings, 0 informations 
+ 28 errors, 25 warnings, 0 informations 

@erictraut erictraut merged commit ae5479d into main Mar 11, 2025
18 checks passed
@erictraut erictraut deleted the issue-10058 branch March 11, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant