I think I'm having an issue that goes a bit beyond...
# general
r
I think I'm having an issue that goes a bit beyond the help of
module_mappings
though. I'm getting errors trying to resolve packages like yaml click, and six even with a module mapping. Not to mention the default module mapping should already cover the YAML case. I'll investigate it later but I've been seeing this for a while.
h
Weird, all those should be mapped correctly (pyyaml is in the default mapping, and six and click have the same name as their top-level package, so they don’t need explicit mapping)
Is this error happening during lockfile generation?
r
There's a warning that happens when running
pants check
with MyPy. Lockfile generation is fine. I'll see if I can reconstruct a simple repro
h
Ah so you may need to add type stubs for those libraries to your requirements.txt (or specify them in `[mypy].extra_type_stubs`: https://www.pantsbuild.org/docs/reference-mypy#extra_type_stubs
🤔 1
r
Oh no I did add the types- for these packages. The problem isn't specific to MyPy. I think it warns during things like tests too. I'm not sure if the problem actually manifests as a runtime error though
I think not because tests generally pass or at least don't fail on transitive import failures