I think I've found a potential reproduction case o...
# general
r
I think I've found a potential reproduction case of pantsbuild/pants#18519: https://github.com/pantsbuild/pants/issues/18519#issuecomment-1564499315
I'm on pants 2.16.0rc4
I think this has happened before, but I’ve just put duplicate type stub requirements in pants.toml. Now 2.16 uses per-tool requirements and resolves, and this bug became more apparent.
Hit this again.... I think there is some issue related to stub dependency tracking...
Patching the PR by
Copy code
diff --git a/BUILD b/BUILD
index c9bda9306..8d74b8143 100644
--- a/BUILD
+++ b/BUILD
@@ -23,7 +23,7 @@ python_requirements(
         "types-PyYAML": ["yaml"],
         "types-python-dateutil": ["dateutil", "dateutil.parser", "<http://dateutil.tz|dateutil.tz>"],
         "types-redis": ["redis"],
-        "types-six": ["six"],
+        "types-six": ["six", "graphql", "promise"],
         "types-tabulate": ["tabulate"],
     },
 )
resolves the issue
So this should be something related to mismatch of transitive dependency resolution in pants and mypy
Hm... I have to add more packages to the type-stub mapping... This is particularly annoying because changing the mapping makes the error to disappear temporarily but reappears with different type-stub packages later...
It seems that this mostly happens with 3rd party packages that have
py.typed
(graphql, _pytest)