I'm trying to run `mypy` check with pants. On my c...
# general
I'm trying to run
check with pants. On my console it works fine. But on GitHub Action, I get this weird error message:
Copy code
Error: 9.77 [ERROR] Completed: Typecheck using MyPy - mypy failed (exit code 2).
.cache/pex_root/venvs/2dc0bc0943d3614000af98704b489da83561978d/f8dfd366c5bae0ea109e2675cda4aa418ef670f0/lib/python3.10/site-packages/numpy/__init__.pyi:636: error: Positional-only parameters are only supported in Python 3.8 and greater
It's weird because I'm using Python 3.10, and pants should be able to infer the version, right? Also weird that its checking a third-party package. I'm using pants 2.13.0 and mypy.ini settings are:
Copy code
namespace_packages = true
explicit_package_bases = true
ignore_missing_imports = true
ah well, the issue seems to be with mypy on python 3.10.7: https://github.com/python/mypy/issues/13627 will try to pin to newer mypy version and try
how's pants' mypy version update? Will we use mypy>=0.981 in the upcoming 2.14? (or even possible to update mypy dependency in 2.13 ?) This will cause trouble to a lot of users as they move to 3.10.7
In terms of moving forward, generally if you open a ticket or even add the PR, I don't think anyone has issues updating default versions (unless there is some critical reason to not do it)
might be weird, because I don't know what their breaking change policy is - as in, are they modifying checks that can break Pants user's CI?
yup. was gonna change mypy version manually but setting up a separate lockfile etc is a bit of hassle. I'll see if I can open a PR to update mypy to the latest. As far as I can tell, its more of python 3.10.7's change that previously version of mypy wasn't future proof of
👍 1