-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fixed bug that results in a false negative when two import statements… #9753
Closed
Conversation
This file contains 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
… shadow the same symbol and an attribute is accessed between the two import statements. This addresses #9752.
Diff from mypy_primer, showing the effect of this PR on open source code: pytest (https://github.com/pytest-dev/pytest)
- /tmp/mypy_primer/projects/pytest/doc/en/example/assertion/failure_demo.py:200:46 - error: Argument of type "ModuleSpec | None" cannot be assigned to parameter "spec" of type "ModuleSpec" in function "module_from_spec"
- Type "ModuleSpec | None" is not assignable to type "ModuleSpec"
- "None" is not assignable to "ModuleSpec" (reportArgumentType)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/assertion/rewrite.py:64:40 - error: "abc" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/assertion/rewrite.py:64:70 - error: "abc" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/assertion/rewrite.py:88:28 - error: "machinery" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/assertion/rewrite.py:95:20 - error: "machinery" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/assertion/rewrite.py:122:54 - error: "machinery" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/assertion/rewrite.py:141:31 - error: "machinery" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/config/__init__.py:379:27 - error: "deprecated" is not a known attribute of module "_pytest" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/config/__init__.py:489:28 - error: "deprecated" is not a known attribute of module "_pytest" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/src/_pytest/config/__init__.py:494:30 - error: "replace" is not a known attribute of "None" (reportOptionalMemberAccess)
+ /tmp/mypy_primer/projects/pytest/testing/test_pastebin.py
+ /tmp/mypy_primer/projects/pytest/testing/test_pastebin.py:103:26 - error: "error" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/testing/test_pathlib.py:1609:40 - error: "abc" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/testing/test_pathlib.py:1619:28 - error: "machinery" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/pytest/testing/test_terminal.py:1831:22 - error: "config" is not a known attribute of module "_pytest" (reportAttributeAccessIssue)
- 703 errors, 44 warnings, 0 informations
+ 715 errors, 44 warnings, 0 informations
pyodide (https://github.com/pyodide/pyodide)
+ /tmp/mypy_primer/projects/pyodide/pyodide-build/pyodide_build/mkpkg.py:120:19 - error: "error" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
- 756 errors, 14 warnings, 0 informations
+ 757 errors, 14 warnings, 0 informations
steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/steam/_const.py:115:36 - error: Type of "find_spec" is partially unknown
+ Type of "find_spec" is "(name: str, package: str | None = None) -> (Unknown | None)" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/steam.py/steam/ext/commands/bot.py:229:20 - error: Type of "spec_from_file_location" is partially unknown
+ Type of "spec_from_file_location" is "(name: str, location: str | bytes | PathLike[str] | PathLike[bytes] | None = None, *, loader: LoaderProtocol | None = None, submodule_search_locations: list[str] | None = ...) -> (Unknown | None)" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/steam.py/steam/ext/commands/bot.py:231:20 - error: Type of "find_spec" is partially unknown
+ Type of "find_spec" is "(name: str, package: str | None = None) -> (Unknown | None)" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/steam.py/steam/ext/commands/bot.py:253:18 - error: Type of "module_from_spec" is partially unknown
+ Type of "module_from_spec" is "(spec: Unknown) -> ModuleType" (reportUnknownMemberType)
- 8509 errors, 94 warnings, 0 informations
+ 8513 errors, 94 warnings, 0 informations
psycopg (https://github.com/psycopg/psycopg)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:69:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:69:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:144:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:144:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:157:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:157:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:172:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:172:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:175:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:175:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:191:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:191:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:199:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:199:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:207:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:207:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:215:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:215:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:224:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:224:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:230:32 - error: "NotSupportedError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:230:32 - error: "NotSupportedError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:238:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:238:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:247:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:247:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:263:13 - error: "waiting" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:263:13 - error: "waiting" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:275:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:275:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:294:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:294:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:301:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:301:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:308:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:308:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:320:20 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:320:20 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:347:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:347:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:389:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:389:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:394:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:394:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:403:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:403:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:498:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:498:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:500:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:500:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:502:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:502:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:504:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:504:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:515:32 - error: "OperationalError" is not a known attribute of module "psycopg" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/psycopg/tests/pq/test_pgconn.py:515:32 - error: "OperationalError" is not a known attribute of module "psycopg.generators" (reportAttributeAccessIssue)
... (truncated 24 lines) ...
ibis (https://github.com/ibis-project/ibis)
+ /tmp/mypy_primer/projects/ibis/ibis/backends/bigquery/__init__.py:342:29 - error: "auth" is not a known attribute of module "google.api_core.exceptions" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/ibis/ibis/backends/bigquery/__init__.py:634:23 - error: "api_core" is not a known attribute of module "google.auth.credentials" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/ibis/ibis/backends/bigquery/__init__.py:1168:25 - error: "auth" is not a known attribute of module "google.api_core.exceptions" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/ibis/ibis/backends/snowflake/__init__.py:337:33 - error: "snowpark" is not a known attribute of module "snowflake.connector" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/ibis/ibis/backends/snowflake/__init__.py:390:66 - error: "snowpark" is not a known attribute of module "snowflake.connector" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/ibis/ibis/common/temporal.py:225:26 - error: "parser" is not a known attribute of module "dateutil" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/ibis/ibis/common/temporal.py:226:21 - error: "parser" is not a known attribute of module "dateutil" (reportAttributeAccessIssue)
- 7452 errors, 120 warnings, 0 informations
+ 7459 errors, 120 warnings, 0 informations
sympy (https://github.com/sympy/sympy)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/_compilation/util.py:276:21 - error: "exec_module" is not a known attribute of "None" (reportOptionalMemberAccess)
- 33001 errors, 73 warnings, 0 informations
+ 33000 errors, 73 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 "SSLError" is not assignable to declared type "type[SSLError]"
+ /tmp/mypy_primer/projects/mongo-python-driver/pymongo/ssl_support.py:54:16 - error: Type "pymongo.pyopenssl_context.SSLError | pymongo.ssl_context.SSLError" is not assignable to declared type "type[SSLError]"
+ Type "pymongo.pyopenssl_context.SSLError | pymongo.ssl_context.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"
+ Type "pymongo.pyopenssl_context.SSLContext | ssl.SSLContext" is not assignable to type "SSLContext"
+ "ssl.SSLContext" is not assignable to "pymongo.pyopenssl_context.SSLContext" (reportReturnType)
+ /tmp/mypy_primer/projects/mongo-python-driver/pymongo/asynchronous/database.py:821:38 - error: "codec_options" is not a known attribute of module "bson" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/mongo-python-driver/pymongo/synchronous/database.py:821:38 - error: "codec_options" is not a known attribute of module "bson" (reportAttributeAccessIssue)
- 1167 errors, 28 warnings, 0 informations
+ 1170 errors, 28 warnings, 0 informations
apprise (https://github.com/caronc/apprise)
- /tmp/mypy_primer/projects/apprise/apprise/utils/module.py:39:50 - error: Argument of type "ModuleSpec | None" cannot be assigned to parameter "spec" of type "ModuleSpec" in function "module_from_spec"
- Type "ModuleSpec | None" is not assignable to type "ModuleSpec"
- "None" is not assignable to "ModuleSpec" (reportArgumentType)
- /tmp/mypy_primer/projects/apprise/apprise/utils/module.py:42:21 - error: "exec_module" is not a known attribute of "None" (reportOptionalMemberAccess)
- 8432 errors, 238 warnings, 0 informations
+ 8430 errors, 238 warnings, 0 informations
nox (https://github.com/wntrblm/nox)
+ /tmp/mypy_primer/projects/nox/nox/sessions.py
+ /tmp/mypy_primer/projects/nox/nox/sessions.py:334:23 - error: "command" is not a known attribute of module "nox" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/nox/nox/sessions.py:638:20 - error: "command" is not a known attribute of module "nox" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/nox/nox/sessions.py:1117:20 - error: "command" is not a known attribute of module "nox" (reportAttributeAccessIssue)
- 26 errors, 0 warnings, 0 informations
+ 29 errors, 0 warnings, 0 informations
discord.py (https://github.com/Rapptz/discord.py)
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/bot.py:946:60 - error: "machinery" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/bot.py:948:25 - error: "util" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/bot.py:951:45 - warning: Unnecessary "# type: ignore" comment (reportUnnecessaryTypeIgnoreComment)
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/bot.py:974:30 - error: "util" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/bot.py:1025:26 - error: "util" is not a known attribute of module "importlib" (reportAttributeAccessIssue)
- 103 errors, 97 warnings, 0 informations
+ 107 errors, 98 warnings, 0 informations
bokeh (https://github.com/bokeh/bokeh)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/server/auth_provider.py:297:46 - error: Argument of type "ModuleSpec | None" cannot be assigned to parameter "spec" of type "ModuleSpec" in function "module_from_spec"
- Type "ModuleSpec | None" is not assignable to type "ModuleSpec"
- "None" is not assignable to "ModuleSpec" (reportArgumentType)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/server/auth_provider.py:298:17 - error: "exec_module" is not a known attribute of "None" (reportOptionalMemberAccess)
- 3564 errors, 294 warnings, 0 informations
+ 3562 errors, 294 warnings, 0 informations
operator (https://github.com/canonical/operator)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:385:25 - error: Type of parameter "req" is unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:385:30 - error: Type of "request" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:385:30 - error: Type of "Request" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:385:37 - error: "request" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:389:13 - error: Argument type is unknown
+ Argument corresponds to parameter "req" in function "do_open" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1966:9 - error: Type of parameter "opener" is partially unknown
+ Parameter type is "Unknown | None" (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1966:26 - error: Type of "request" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1966:26 - error: Type of "OpenerDirector" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1966:33 - error: "request" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1973:13 - error: Type of "opener" is partially unknown
+ Type of "opener" is "Unknown | None" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1973:22 - error: Type of "_get_default_opener" is partially unknown
+ Type of "_get_default_opener" is "(socket_path: str) -> Unknown" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1975:9 - error: Type of "opener" is partially unknown
+ Type of "opener" is "Unknown | None" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1980:9 - error: Return type is unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1980:55 - error: Type of "request" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1980:55 - error: Type of "OpenerDirector" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:1980:62 - error: "request" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2042:28 - error: Type of "parse" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2042:28 - error: Type of "urlencode" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2042:35 - error: "parse" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2049:13 - error: Type of "response" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2049:24 - error: Type of "opener" is partially unknown
+ Type of "opener" is "Unknown | None" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2049:24 - error: Type of "open" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2049:36 - error: "open" is not a known attribute of "None" (reportOptionalMemberAccess)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2050:16 - error: Type of "error" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2050:16 - error: Type of "HTTPError" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2050:23 - error: "error" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2050:42 - error: Type of "e" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2051:13 - error: Type of "code" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2051:20 - error: Type of "code" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2052:13 - error: Type of "status" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2052:22 - error: Type of "reason" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2054:51 - error: Type of "read" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2054:51 - error: Argument type is unknown
+ Argument corresponds to parameter "s" in function "loads" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2060:34 - error: Argument type is unknown
+ Argument corresponds to parameter "code" in function "__init__" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2060:40 - error: Argument type is unknown
+ Argument corresponds to parameter "status" in function "__init__" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2061:16 - error: Type of "error" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2061:16 - error: Type of "URLError" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2061:23 - error: "error" is not a known attribute of module "urllib" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2061:41 - error: Type of "e" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2062:16 - error: Type of "args" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2062:38 - error: Type of "args" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2067:35 - error: Type of "reason" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2067:35 - error: Argument type is unknown
+ Argument corresponds to parameter "args" in function "__init__" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/ops/pebble.py:2069:16 - error: Return type is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:331:9 - error: Type of "charm_spec" is partially unknown
+ Type of "charm_spec" is "Unknown | None" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:331:22 - error: Type of "spec_from_file_location" is partially unknown
+ Type of "spec_from_file_location" is "(name: str, location: str | bytes | PathLike[str] | PathLike[bytes] | None = None, *, loader: LoaderProtocol | None = None, submodule_search_locations: list[str] | None = ...) -> (Unknown | None)" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:333:29 - error: Type of "module_from_spec" is partially unknown
+ Type of "module_from_spec" is "(spec: Unknown) -> ModuleType" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:333:61 - error: Argument type is unknown
+ Argument corresponds to parameter "spec" in function "module_from_spec" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:334:16 - error: Type of "loader" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:335:9 - error: Type of "loader" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:335:9 - error: Type of "exec_module" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:1383:9 - error: Type of "message" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:1383:19 - error: Type of "message" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:1383:19 - error: Type of "Message" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:1383:25 - error: "message" is not a known attribute of module "email" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:1386:9 - error: Type of "headers" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2590:9 - error: Type of "message" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2590:19 - error: Type of "message" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2590:19 - error: Type of "Message" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2590:25 - error: "message" is not a known attribute of module "email" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2592:16 - error: Type of "get_content_type" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2593:9 - error: Type of "boundary" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/operator/test/test_pebble.py:2593:20 - error: Type of "get_param" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_real_pebble.py:138:28 - error: Type of "error" is unknown (reportUnknownMemberType)
... (truncated 1131 lines) ...``` |
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.
… shadow the same symbol and an attribute is accessed between the two import statements. This addresses #9752.