https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

01/17/2023, 8:21 PM
Anyone have a custom formatter/fixer/linter using 2.15 and mypy? I'm getting
Name "MyClassName.Batch" is not defined
from:
Copy code
class MyClassName(FmtTargetsRequest):
    ...
oddly, declaring
x: FmtTargetsRequest.Batch
makes
mypy
happy I'm also trying with
0.961
which is the version Pants uses in-repo
1
Nevermind. Turns out
ignore_missing_imports
was enabled.
So how are y'all getting mypy to recognize
pants
imports during
check
? 🤔 It's in
requirements.pex
Ah one of these fixes it:
Copy code
explicit_package_bases
namespace_packages