lemon-oxygen-2929
01/27/2024, 12:28 AMfrom typing import TYPE_CHECKING, TypeVar
if TYPE_CHECKING:
from _typeshed import SupportsRichComparison
K = TypeVar("K", bound=SupportsRichComparison)
else:
K = TypeVar("K")
But dependency inference fails with this error:
UnownedDependencyError: Pants cannot infer owners for the following imports in the target projects/simulator/engine/utils/range_map_helper.py:
* _typeshed.SupportsRichComparison (line: 5)
My first thought was that I probably need to add something to module_mapping
, but _typeshed
is an stdlib module, and I don't know how to add a mapping to the stdlib. Is that possible?
For now, I have this marked with no-infer-dep
, but I'd like to figure out how to fix it properly.curved-manchester-66006
01/27/2024, 1:28 AMcurved-manchester-66006
01/27/2024, 1:31 AMlemon-oxygen-2929
01/27/2024, 12:11 PMuse_rust_parser
!lemon-oxygen-2929
01/27/2024, 12:14 PMno-infer-dep
solution for this. I don't see any possible foot-gun it could cause, since it's in the stdlib.
But if it seems like a bug rather than me holding it wrong, might be worth fixing so others don't run into it in the future.fresh-cat-90827
01/28/2024, 9:56 PMlemon-oxygen-2929
01/28/2024, 11:33 PM