Hi all, quick question - pants complain about not ...
# general
p
Hi all, quick question - pants complain about not defined 3rd party dependency:
Copy code
Pants cannot infer owners for the following imports in the target <name>.pyi :
* typing_extensions (line: 17)
This is coming from an autogenerated type hints file:
Copy code
if sys.version_info >= (3, 8):
    import typing as typing_extensions
else:
    import typing_extensions
Since this file was autogenerated, and our codebase is on python 3.8, is there a way to globally ignore this
typing_extensions
import for
.pyi
files? I can of course modify the file and add
no-infer-dep
comment there, but I was wondering if there is more global way of doing that? Thanks!
c
yes, since 2.16.0a0 there is a new
[python-infer].ignored_unowned_imports
option: https://github.com/pantsbuild/pants/pull/18094
p
awesome, thank you!