rapid-bird-79300
02/10/2023, 12:12 AM[mypy]
skip = true
config = "tools/python/mypy.ini"
extra_requirements.add = ['SQLAlchemy[mypy]==2.0.0']
lockfile = "tools/python/mypy.lock"
and the following mypy.ini
[mypy]
plugins = sqlalchemy.ext.mypy.plugin
no_implicit_optional = True
local_partial_types = True
follow_imports = normal
disallow_untyped_defs = True
disable_error_code = misc
exclude = alembic
We added a new project that does not use sqlalchemy and now running mypy with pants we see the following errors:
/Users/njgrisafi/.cache/pants/named_caches/pex_root/venvs/5bcbf65366e68d9647087f9935ca1efcc8fff5d1/b3aef238742d4e1a2d2b93cbfe8e2aa5b6944556/lib/python3.9/site-packages/mypy/typeshed/stdlib/fnmatch.pyi: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
/Users/njgrisafi/.cache/pants/named_caches/pex_root/venvs/5bcbf65366e68d9647087f9935ca1efcc8fff5d1/b3aef238742d4e1a2d2b93cbfe8e2aa5b6944556/lib/python3.9/site-packages/mypy/typeshed/stdlib/fnmatch.pyi: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
/Users/njgrisafi/.cache/pants/named_caches/pex_root/venvs/5bcbf65366e68d9647087f9935ca1efcc8fff5d1/b3aef238742d4e1a2d2b93cbfe8e2aa5b6944556/lib/python3.9/site-packages/mypy/typeshed/stdlib/fnmatch.pyi: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
rapid-bird-79300
02/10/2023, 12:12 AMrapid-bird-79300
02/10/2023, 12:13 AM./pants check --no-mypy-skip tools/::
enough-analyst-54434
02/10/2023, 12:16 AMrapid-bird-79300
02/10/2023, 12:16 AMPartition #1 - service-catalog, ['CPython<3.12,>=3.9']:
tools/python/service-catalog/tests/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/tests/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/tests/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/service_catalog.py:21: error: Incompatible default for argument "unwanted_values" (default has type "None", argument has type "List[Any]")
tools/python/service-catalog/service_catalog/service_catalog.py:27: error: TypedDict key must be a string literal; expected one of ("name", "github_team", "slack_handle", "opsgenie_handle", "pagerduty_escalation_policy", ...)
tools/python/service-catalog/service_catalog/service_catalog.py:66: error: Argument 1 to "create_model_from_typeddict" has incompatible type "Type[Service]"; expected "Type[TypedDict]"
tools/python/service-catalog/service_catalog/service_catalog.py:78: error: Unsupported left operand type for + ("Set[str]")
tools/python/service-catalog/service_catalog/cli/utils.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/utils.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/utils.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/utils.py:14: error: Argument 1 to "setLevel" of "Handler" has incompatible type "Optional[str]"; expected "Union[int, str]"
tools/python/service-catalog/service_catalog/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/__init__.py: note: See <https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports>
tools/python/service-catalog/service_catalog/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/file_ownership.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/file_ownership.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/file_ownership.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/file_ownership.py:45: error: Cannot find replacement for positional format specifier 0
tools/python/service-catalog/service_catalog/cli/main.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/main.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/main.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
Found 30 errors in 8 files (checked 7 source files)
Partition #2 - test-selection, ['CPython<3.12,>=3.9']:
Success: no issues found in 38 source files
rapid-bird-79300
02/10/2023, 12:16 AMhappy-kitchen-89482
02/10/2023, 12:18 AMrapid-bird-79300
02/10/2023, 12:18 AMrapid-bird-79300
02/10/2023, 12:21 AM17:21:13.65 [ERROR] Completed: Typecheck using MyPy - mypy failed (exit code 1).
Partition #1 - service-catalog, ['CPython<3.10,>=3.9.5']:
tools/python/service-catalog/tests/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/tests/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/tests/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/tests/test_service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/service_catalog.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/service_catalog.py:21: error: Incompatible default for argument "unwanted_values" (default has type "None", argument has type "List[Any]")
tools/python/service-catalog/service_catalog/service_catalog.py:27: error: TypedDict key must be a string literal; expected one of ("name", "github_team", "slack_handle", "opsgenie_handle", "pagerduty_escalation_policy", ...)
tools/python/service-catalog/service_catalog/service_catalog.py:66: error: Argument 1 to "create_model_from_typeddict" has incompatible type "Type[Service]"; expected "Type[TypedDict]"
tools/python/service-catalog/service_catalog/service_catalog.py:78: error: Unsupported left operand type for + ("Set[str]")
tools/python/service-catalog/service_catalog/cli/utils.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/utils.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/utils.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/utils.py:14: error: Argument 1 to "setLevel" of "Handler" has incompatible type "Optional[str]"; expected "Union[int, str]"
tools/python/service-catalog/service_catalog/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/__init__.py: note: See <https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports>
tools/python/service-catalog/service_catalog/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/__init__.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/file_ownership.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/file_ownership.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/file_ownership.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
tools/python/service-catalog/service_catalog/cli/file_ownership.py:45: error: Cannot find replacement for positional format specifier 0
tools/python/service-catalog/service_catalog/cli/main.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm"
tools/python/service-catalog/service_catalog/cli/main.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.attributes"
tools/python/service-catalog/service_catalog/cli/main.py: error: Cannot find implementation or library stub for module named "sqlalchemy.orm.decl_api"
Found 30 errors in 8 files (checked 7 source files)
Partition #2 - test-selection, ['CPython<3.10,>=3.9.5']:
Success: no issues found in 38 source files
ā mypy failed.
rapid-bird-79300
02/10/2023, 12:21 AMhappy-kitchen-89482
02/10/2023, 12:21 AMrapid-bird-79300
02/10/2023, 12:22 AMhappy-kitchen-89482
02/10/2023, 12:22 AMrapid-bird-79300
02/10/2023, 12:23 AMrapid-bird-79300
02/10/2023, 12:23 AMhappy-kitchen-89482
02/10/2023, 12:23 AMsqlalchemy.ext.mypy.plugin
plugin expects to find sqlalchemy, and isn't, despite extra_requirements.add = ['SQLAlchemy[mypy]==2.0.0']
happy-kitchen-89482
02/10/2023, 12:25 AMrapid-bird-79300
02/10/2023, 12:26 AM./pants check
command in CI per project point to different mypy.inirapid-bird-79300
02/10/2023, 12:28 AMrapid-bird-79300
02/10/2023, 12:28 AMrapid-bird-79300
02/10/2023, 12:33 AMrapid-bird-79300
02/10/2023, 12:39 AMnjgrisafi@Nicks-MacBook-Pro ~/workspace/rippling-main (jd-service-catalog)$ ./pants check --no-mypy-skip --mypy-config=tools/python/service-catalog/mypy.ini tools/python/service-catalog/::
17:39:28.25 [ERROR] Completed: Typecheck using MyPy - mypy failed (exit code 1).
tools/python/service-catalog/service_catalog/service_catalog.py:21: error: Incompatible default for argument "unwanted_values" (default has type "None", argument has type "List[Any]")
tools/python/service-catalog/service_catalog/service_catalog.py:27: error: TypedDict key must be a string literal; expected one of ("name", "github_team", "slack_handle", "opsgenie_handle", "pagerduty_escalation_policy", ...)
tools/python/service-catalog/service_catalog/service_catalog.py:66: error: Argument 1 to "create_model_from_typeddict" has incompatible type "Type[Service]"; expected "Type[TypedDict]"
tools/python/service-catalog/service_catalog/service_catalog.py:78: error: Unsupported left operand type for + ("Set[str]")
tools/python/service-catalog/service_catalog/cli/utils.py:14: error: Argument 1 to "setLevel" of "Handler" has incompatible type "Optional[str]"; expected "Union[int, str]"
tools/python/service-catalog/service_catalog/cli/file_ownership.py:45: error: Cannot find replacement for positional format specifier 0
Found 6 errors in 3 files (checked 7 source files)
ā mypy failed.
but yeah curious if this a bughappy-kitchen-89482
02/10/2023, 3:46 AMrapid-bird-79300
02/10/2023, 3:47 AMhappy-kitchen-89482
02/10/2023, 3:47 AM