https://pantsbuild.org/ logo
f

fast-nail-55400

06/23/2020, 11:36 PM
what pants invocation runs mypy in the pants repo? (I’m looking through build-support/bin/ci.py but see nothing obvious to say what is run)
and https://travis-ci.com/github/pantsbuild/pants/jobs/352858202#L542 doesn’t display the command that was run
h

hundreds-father-404

06/23/2020, 11:38 PM
build-support/bin/mypy.py
. My current priority is to replace this with having it always activated by default via the
lint
goal
We had to disable it by default because the v1 task would trigger a bunch of side effects that would cause v1
lint
to fail. v2 avoids this issue
f

fast-nail-55400

06/23/2020, 11:40 PM
that would explain why my attempt to run
./pants mypy
and `./pants lint.mypy`` failed to work
Copy code
tdyas@paradox:~/TC/pants$ build-support/bin/mypy.py
cannot import name '_is_build_file_name' from 'pants.build_graph.address' (/Users/tdyas/.venvs/3/lib/python3.7/site-packages/pants/build_graph/address.py)
NoneType: None
Please fix the above errors and run again.
h

hundreds-father-404

06/23/2020, 11:41 PM
huh, that’s weird
maybe run
./pants clean-all
?
f

fast-nail-55400

06/23/2020, 11:42 PM
nope still same error
huh it is looking in my venv
👀 1
/Users/tdyas/.venvs/3/lib/python3.7/site-packages/pants/build_graph/address.py
h

hundreds-father-404

06/23/2020, 11:43 PM
would it be easier for me to fix and send you a diff?
f

fast-nail-55400

06/23/2020, 11:43 PM
yeah, that works for me. I just want to replicate the mypy error that was in CI …
h

hundreds-father-404

06/23/2020, 11:43 PM
Because v1 MyPy is going away today or tomorrow, I wouldn’t spend too much time on replicating
f

fast-nail-55400

06/23/2020, 11:43 PM
you mean fix the mypy error in my PR or fix this inability to run the mypy CI script?
h

hundreds-father-404

06/23/2020, 11:44 PM
fix the MyPy error in the PR
f

fast-nail-55400

06/23/2020, 11:44 PM
fine by me
3 Views