I’m having trouble getting mypy working with a poe...
# general
a
I’m having trouble getting mypy working with a poetry-driven pants setup, but finding I get a
Could not find script 'mypy' in any distribution  within PEX!
error. I tried adding
requirements =["//:thirdparty#mypy"]
to the
pants.toml
which then caused an error with no detail `Engine traceback: in
check
goal AssertionError:` . Any help would be appreciated! Relevant files in 🧵
Copy code
-- BUILD
poetry_requirements(
    name="thirdparty",
    module_mapping={...},
)
Copy code
-- pants.toml
[GLOBAL]
pants_version = "2.18.1"

backend_packages = [
  "pants.backend.python",
  "pants.backend.experimental.python.lint.ruff",
  "pants.backend.python.typecheck.mypy"
]

[python]
interpreter_constraints = [">=3.10.*"]
run_against_entire_lockfile = true
enable_resolves = true
default_resolve = "common"

[python.resolves]
common = "poetry.pants.lock"

[mypy]
install_from_resolve = 'common'
config = 'pyproject.toml'

[python-repos]
indexes.add = [//private_repo]
b
Sorry for the trouble. Can you share more info about the resolve with mypy in it? (Eg which version, potentially just the lines mentioning mypy in the poetry.pants.lock file) Also, can you run the version that fails with an assertion error with
--print-stacktrace
and post the full error output?