high-yak-8589902/08/2022, 5:37 AM
for type checking instead of
? I'm finding
incredibly prohibitive to get working. For a tool written to work with python as the intended target, they're rather inflexible. Pyright has been working great for us, but it's another thing that requires us to construct a large venv at the moment and type check every file all the time.
happy-kitchen-8948202/08/2022, 5:45 AM
high-yak-8589902/08/2022, 5:47 AM
happy-kitchen-8948202/08/2022, 5:54 AM
but I'm vaguely assuming it's similar to mypy in spirit?
high-yak-8589902/08/2022, 5:59 AM
bitter-ability-3219002/08/2022, 11:35 AM
happy-kitchen-8948202/08/2022, 3:52 PM
high-yak-8589902/08/2022, 5:24 PM
almost fully integrated has already made our build system happier!
hundreds-father-40402/08/2022, 5:32 PM
Getting pants test almost fully integrated has already made our build system happier!Glad to hear! How so?
but it would probably be useful to get a rundown of how the mypy integration works at a high levelEssentially: 1. Determine which files/targets to run. MyPy needs transitive dependencies. We also do some fancy partitioning to handle multiple "resolves" (lockfiles) in the repo, along with multiple conflicting interpreter constraints like Py2 vs Py3 2. Build the MyPy PEX, along with an extra PEX if
is set. Separately, build a PEX for user requirements using
3. Locate config files and set up the argv. Also we figure out what
to use if you didn't already set it. Figure out MYPY_PATH and PYTHONPATH values
to merge all those PEXes from step 2 and invoke with inputs from step 3.
high-yak-8589902/08/2022, 5:37 PM
and, despite parallelization, the build took around 4 to 5 minutes. With
we're hitting at most around 40 seconds test time regularly and only use
for the things we weren't able to migrate at this time (because of the way they're written).
hundreds-father-40402/08/2022, 5:39 PM
high-yak-8589902/08/2022, 5:40 PM
like we were. We got remote cache set up really easily with our already existing
deployments so that's been an extra benefit.
hundreds-father-40402/08/2022, 5:44 PM
high-yak-8589902/08/2022, 6:15 PM