Failing to lock `mypy` when adding a py3.7+ dep? `...
# development
b
Failing to lock
mypy
when adding a py3.7+ dep?
The current project's Python requirement (>=3.6)
I thought Pants was 3.7+?
All the lockfiles seem to say:
valid_for_interpreter_constraints..."CPython<4,>=3.6"
I would've expected the same value as `pants.toml`'s
interpreter_constraints
Oh some of them are different, but `mypy`'s is 3.6
It seems that
mypy
doesn't inherit
python
's
interpreter_constraints
. @hundreds-father-404 should it?
h
It's complicated. That option is what to install and run MyPy itself with, which can be different than the version of Python MyPy targets the code for We dynamically determine what version of Python MYpy should target via
[python].interpreter_constraints
option + field. But for what to run the tool, we use
[mypy].interpreter_constarints
. If you have the default, we also check if your code is exclusively Py38+ and update the default constraints to match that if so, because MyPy run with <38 cannot target code >=38