boto3-stubs
being used as dependency when boto3
is imported
#14513
Labels
boto3-stubs
being used as dependency when boto3
is imported
#14513
Describe the bug
I recently added boto3-stubs to my project to make interactions with
boto3.client
objects easier in my IDE. This broke the dependency inference for my modules that importedboto3
. When I run./pants dependencies path/to/my_module.py
, I am now seeing//:boto3-stubs
and//:boto3
is absent.I can remedy this by manually adding
//:boto3
as a dependency for my module, but this seems like it should not be necessary. I also tried editingmodule_mapping
at the top level, but this had no effect. I did find some mention of type stub behavior in the docs here, but that seemed useful for picking up type stubs rather than removing them.Lastly, an observation from this is that it seems like adding type stub libraries will make entities packaged by Pants heavier. The type stubs are only necessary for linting and, in my opinion, should never be included as a dependency unless a goal specifically needs them.
Pants version
2.9.0
OS
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: