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

Improved support for unused import detection for import statements th… #10037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erictraut
Copy link
Collaborator

…at target multi-part names. This addresses #9622.

Copy link
Contributor

github-actions bot commented Mar 5, 2025

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/assumptions/tests/test_query.py:2179:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2179:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2181:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2181:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2183:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2183:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2188:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2188:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2424:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2424:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2427:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2427:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2429:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/assumptions/tests/test_query.py:2429:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/calculus/tests/test_finite_diff.py:131:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/calculus/tests/test_finite_diff.py:131:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/calculus/tests/test_finite_diff.py:138:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/calculus/tests/test_finite_diff.py:138:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:496:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:496:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:498:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:498:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:500:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:500:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:502:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:502:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:506:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:506:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:508:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:508:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:510:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:510:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:512:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/tests/test_permutations.py:512:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_args.py:3777:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_args.py:3777:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_arit.py:1702:18 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_arit.py:1702:18 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_basic.py:324:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_basic.py:324:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_compatibility.py
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_compatibility.py:5:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_compatibility.py:5:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_expr.py:2274:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_expr.py:2274:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/sympy/sympy/core/tests/test_expr.py:2277:10 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)

... (truncated 625 lines) ...

openlibrary (https://github.com/internetarchive/openlibrary)
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/plugins/openlibrary/code.py:929:5 - error: "can_write" is not a known attribute of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/plugins/openlibrary/code.py:929:5 - error: Cannot assign to attribute "can_write" for class "None"
+     Attribute "can_write" is unknown (reportAttributeAccessIssue)

psycopg (https://github.com/psycopg/psycopg)
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/pq/__init__.py
-   /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/pq/__init__.py:100:20 - error: Type "type[Escaping] | Unknown" is not assignable to declared type "type[Escaping]"
-     Type "type[Escaping] | Unknown" is not assignable to type "type[Escaping]"
-       "Escaping" is incompatible with protocol "Escaping"
-       Type "type[psycopg.psycopg.pq.pq_ctypes.Escaping]" is not assignable to type "type[psycopg.psycopg.pq.abc.Escaping]"
-         "__init__" is an incompatible type
-           Type "(conn: psycopg.psycopg.pq.pq_ctypes.PGconn | None = None) -> None" is not assignable to type "(conn: psycopg.psycopg.pq.abc.PGconn | None = None) -> None"
-             Parameter 1: type "PGconn | None" is incompatible with type "PGconn | None" (reportAssignmentType)
- 1780 errors, 111 warnings, 0 informations 
+ 1779 errors, 111 warnings, 0 informations 

scikit-learn (https://github.com/scikit-learn/scikit-learn)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:973:14 - error: "pytest" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:973:14 - error: "pytest" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:973:21 - error: Cannot access attribute "importorskip" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:980:14 - error: "pytest" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:980:14 - error: "pytest" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:980:21 - error: Cannot access attribute "importorskip" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:994:14 - error: "pytest" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:994:14 - error: "pytest" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:994:21 - error: Cannot access attribute "importorskip" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1001:14 - error: "pytest" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1001:14 - error: "pytest" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1001:21 - error: Cannot access attribute "importorskip" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1004:14 - error: "pytest" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1004:14 - error: "pytest" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1004:21 - error: Cannot access attribute "importorskip" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1007:14 - error: "pytest" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1007:14 - error: "pytest" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_testing.py:1007:21 - error: Cannot access attribute "importorskip" for class "Unbound" (reportAttributeAccessIssue)
- 13877 errors, 16 warnings, 0 informations 
+ 13883 errors, 16 warnings, 0 informations 

pyodide (https://github.com/pyodide/pyodide)
+   /tmp/mypy_primer/projects/pyodide/pyodide-build/pyodide_build/out_of_tree/pypi.py:391:32 - error: Cannot assign to attribute "BUILD_FLAGS" for class "type[PyPIProvider]"
+     Type "Module("build")" is not assignable to type "Module("build")" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pyodide/pyodide-build/pyodide_build/out_of_tree/pypi.py:421:32 - error: Cannot assign to attribute "BUILD_FLAGS" for class "type[PyPIProvider]"
+     Type "Module("build")" is not assignable to type "Module("build")" (reportAttributeAccessIssue)
- 757 errors, 14 warnings, 0 informations 
+ 759 errors, 14 warnings, 0 informations 

pytest (https://github.com/pytest-dev/pytest)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:364:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:364:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:369:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:369:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:374:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:374:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:819:21 - error: "Never" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:898:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:898:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:907:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:907:14 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:1217:82 - error: "Never" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:1308:22 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __enter__ (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pytest/src/_pytest/_py/path.py:1308:22 - error: Object of type "Never" cannot be used with "with" because it does not correctly implement __exit__ (reportGeneralTypeIssues)
- 787 errors, 56 warnings, 0 informations 
+ 801 errors, 56 warnings, 0 informations 

steam.py (https://github.com/Gobot1234/steam.py)
+   /tmp/mypy_primer/projects/steam.py/steam/_const.py:11:8 - error: Import "importlib.util" is not accessed (reportUnusedImport)
+   /tmp/mypy_primer/projects/steam.py/steam/manifest.py:9:8 - error: Import "os.path" is not accessed (reportUnusedImport)
- 8521 errors, 94 warnings, 0 informations 
+ 8523 errors, 94 warnings, 0 informations 

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
-   /tmp/mypy_primer/projects/mongo-python-driver/pymongo/ssl_support.py:54:16 - error: Type "Unknown | SSLError" is not assignable to declared type "type[SSLError]"
+   /tmp/mypy_primer/projects/mongo-python-driver/pymongo/ssl_support.py:54:16 - error: Type "SSLError" is not assignable to declared type "type[SSLError]"
-     Type "Unknown | SSLError" is not assignable to type "type[SSLError]"
-       "SSLError" is not assignable to "type[SSLError]"
+     "SSLError" is not assignable to "type[SSLError]"
-       Type "SSLError" is not assignable to type "type[SSLError]" (reportAssignmentType)
+     Type "SSLError" is not assignable to type "type[SSLError]" (reportAssignmentType)
-   /tmp/mypy_primer/projects/mongo-python-driver/pymongo/ssl_support.py:105:16 - error: Type "pymongo.pyopenssl_context.SSLContext | ssl.SSLContext" is not assignable to return type "SSLContext"
+   /tmp/mypy_primer/projects/mongo-python-driver/pymongo/ssl_support.py:105:16 - error: Type "SSLContext" is not assignable to return type "SSLContext"
-     Type "pymongo.pyopenssl_context.SSLContext | ssl.SSLContext" is not assignable to type "SSLContext"
-       "ssl.SSLContext" is not assignable to "pymongo.pyopenssl_context.SSLContext" (reportReturnType)
+     "ssl.SSLContext" is not assignable to "pymongo.pyopenssl_context.SSLContext" (reportReturnType)

core (https://github.com/home-assistant/core)
+   /tmp/mypy_primer/projects/core/homeassistant/components/iometer/coordinator.py:50:23 - error: Cannot assign to attribute "client" for class "IOMeterCoordinator*"
+     Type "Module("iometer")" is not assignable to type "Module("iometer")" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/core/homeassistant/components/xiaomi_ble/binary_sensor.py:151:46 - error: Argument of type "XiaomiPassiveBluetoothDataProcessor[bool | None]" cannot be assigned to parameter "processor" of type "PassiveBluetoothDataProcessor[Any, Module("xiaomi_ble")]" in function "async_register_processor"
+     "XiaomiPassiveBluetoothDataProcessor[bool | None]" is not assignable to "PassiveBluetoothDataProcessor[Any, Module("xiaomi_ble")]"
+       Type parameter "_DataT@PassiveBluetoothDataProcessor" is invariant, but "Module("xiaomi_ble")" is not the same as "Module("xiaomi_ble")" (reportArgumentType)
+   /tmp/mypy_primer/projects/core/homeassistant/components/xiaomi_ble/sensor.py:224:46 - error: Argument of type "XiaomiPassiveBluetoothDataProcessor[float | None]" cannot be assigned to parameter "processor" of type "PassiveBluetoothDataProcessor[Any, Module("xiaomi_ble")]" in function "async_register_processor"
+     "XiaomiPassiveBluetoothDataProcessor[float | None]" is not assignable to "PassiveBluetoothDataProcessor[Any, Module("xiaomi_ble")]"
+       Type parameter "_DataT@PassiveBluetoothDataProcessor" is invariant, but "Module("xiaomi_ble")" is not the same as "Module("xiaomi_ble")" (reportArgumentType)
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:73:26 - error: Argument to class must be a base class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:117:42 - error: Expression of type "Literal['python_default']" cannot be assigned to parameter of type "SSLCipherList"
-     "Literal['python_default']" is not assignable to "SSLCipherList" (reportArgumentType)
-   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:148:42 - error: Expression of type "Literal['python_default']" cannot be assigned to parameter of type "SSLCipherList"
-     "Literal['python_default']" is not assignable to "SSLCipherList" (reportArgumentType)
-   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:181:42 - error: Expression of type "Literal['python_default']" cannot be assigned to parameter of type "SSLCipherList"
-     "Literal['python_default']" is not assignable to "SSLCipherList" (reportArgumentType)
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:323:33 - error: Argument to class must be a base class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:317:42 - error: Expression of type "Literal['python_default']" cannot be assigned to parameter of type "SSLCipherList"
-     "Literal['python_default']" is not assignable to "SSLCipherList" (reportArgumentType)
-   /tmp/mypy_primer/projects/core/homeassistant/helpers/aiohttp_client.py:343:42 - error: Expression of type "Literal['python_default']" cannot be assigned to parameter of type "SSLCipherList"
-     "Literal['python_default']" is not assignable to "SSLCipherList" (reportArgumentType)

apprise (https://github.com/caronc/apprise)
-   /tmp/mypy_primer/projects/apprise/apprise/locale.py:116:38 - error: "gettext" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/apprise/apprise/locale.py:116:38 - error: "gettext" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/apprise/apprise/locale.py:116:46 - error: Cannot access attribute "translation" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/apprise/apprise/locale.py:132:47 - error: "gettext" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/apprise/apprise/locale.py:132:47 - error: "gettext" is unbound (reportUnboundVariable)
- 8462 errors, 238 warnings, 0 informations 
+ 8463 errors, 238 warnings, 0 informations 

pip (https://github.com/pypa/pip)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/distlib/util.py:1966:66 - error: Argument of type "dict[str, str | int] | dict[str, Any]" cannot be assigned to parameter "_config_vars" of type "dict[str, str]" in function "get_platform_osx"
-     Type "dict[str, str | int] | dict[str, Any]" is not assignable to type "dict[str, str]"
-       "dict[str, str | int]" is not assignable to "dict[str, str]"
-         Type parameter "_VT@dict" is invariant, but "str | int" is not the same as "str"
-         Consider switching from "dict" to "Mapping" which is covariant in the value type (reportArgumentType)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/packages/backports/weakref_finalize.py:155:17 - error: "gc" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/packages/backports/weakref_finalize.py:155:17 - error: "gc" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/packages/backports/weakref_finalize.py:155:20 - error: Cannot access attribute "enable" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:141:32 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:141:32 - error: "ssl" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:141:36 - error: Cannot access attribute "CERT_NONE" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:235:23 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:235:23 - error: "ssl" is unbound (reportUnboundVariable)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:237:27 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:237:27 - error: "ssl" is unbound (reportUnboundVariable)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:251:23 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:251:23 - error: "ssl" is unbound (reportUnboundVariable)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:253:27 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:253:27 - error: "ssl" is unbound (reportUnboundVariable)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:304:17 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:304:17 - error: "ssl" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:304:21 - error: Cannot access attribute "CERT_REQUIRED" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:329:22 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:329:22 - error: "ssl" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:329:26 - error: Cannot access attribute "CERT_REQUIRED" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:347:21 - error: "ssl" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:347:21 - error: "ssl" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/ssl_.py:347:25 - error: Cannot access attribute "CERT_REQUIRED" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/url.py:315:20 - error: "idna" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/url.py:315:20 - error: "idna" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/url.py:315:25 - error: Cannot access attribute "encode" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/url.py:316:16 - error: "idna" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/url.py:316:16 - error: "idna" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/util/url.py:316:21 - error: Cannot access attribute "IDNAError" for class "Unbound" (reportAttributeAccessIssue)
- 1808 errors, 33 warnings, 0 informations 
+ 1814 errors, 33 warnings, 0 informations 

dulwich (https://github.com/dulwich/dulwich)
-   /tmp/mypy_primer/projects/dulwich/dulwich/pack.py:387:28 - error: "mmap" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/dulwich/dulwich/pack.py:387:28 - error: "mmap" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/dulwich/dulwich/pack.py:387:33 - error: Cannot access attribute "mmap" for class "Unbound" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/dulwich/dulwich/pack.py:387:55 - error: "mmap" is possibly unbound (reportPossiblyUnboundVariable)
+   /tmp/mypy_primer/projects/dulwich/dulwich/pack.py:387:55 - error: "mmap" is unbound (reportUnboundVariable)
+   /tmp/mypy_primer/projects/dulwich/dulwich/pack.py:387:60 - error: Cannot access attribute "ACCESS_READ" for class "Unbound" (reportAttributeAccessIssue)
- 278 errors, 10 warnings, 0 informations 
+ 280 errors, 10 warnings, 0 informations 

antidote (https://github.com/Finistere/antidote)
+   /tmp/mypy_primer/projects/antidote/src/antidote/core/_inject.py:4:8 - error: Import "collections.abc" is not accessed (reportUnusedImport)
+   /tmp/mypy_primer/projects/antidote/src/antidote/core/wiring.py:3:8 - error: Import "collections.abc" is not accessed (reportUnusedImport)
- 744 errors, 78 warnings, 0 informations 
+ 746 errors, 78 warnings, 0 informations 


... (truncated 510 lines) ...```

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