proud-dentist-22844
10/31/2022, 9:27 PM.api_models
import (I'm getting "Pants cannot infer owner" warning):
https://github.com/st2sandbox/st2/blob/pants/pylint_plugins/api_models_test.py#L25
Here /pylint_plugins
is a source root, and /pylint_plugins/api_models_test.py
is using a relative import for /pylint_plugins/api_models.py
:
from . import api_models
Does the dep inference not like relative imports?enough-analyst-54434
10/31/2022, 9:39 PMproud-dentist-22844
11/02/2022, 4:11 AMimport api_models
, when it is not on PYTHON_PATH, I have to do from . import api_models
. I did a try/except ImportError
to do both.