Hi Everyone :slightly_smiling_face: do you know if...
# general
e
Hi Everyone šŸ™‚ do you know if this error comes from pants ā€œstdout=ā€œPackage myproject appears to be a ā€˜namespace packageā€™ (see PEP 420), which is not currently supported. If this is not deliberate, adding an init.py file should fix the problem.\nā€ Iā€™m trying to add a new linter, but Iā€™m not sure if the error comes from the linter or from pants itself
b
Do you have more output to share?
Grepping Pants for this error shows no hits. Is this from
pytest
?
h
That's an error from
lint-imports
AFAICT: https://github.com/seddonym/import-linter/issues/93
I'm guessing that you're getting this error because a
__init__.py
(I think the root package-level one) is missing in the sandbox (which you can confirm by running with
--no-process-cleanup
and looking in the sandbox)
Are you running with
[python-infer].inits
turned on? https://www.pantsbuild.org/docs/reference-python-infer#section-inits
This shouldn't be necessary if your ancestor
__init__.py
files are empty
Or maybe your code under linting truly doesn't have that
__init__.py
, in which case, add one... šŸ™‚
āœ… 2
e
It seems to me that Iā€™ve already added one šŸ˜• But Iā€™ll retry in the light of the last advice you gave to me
even by adding the init file in my unit test it doesnā€™t work.
Iā€™ve opened this PR https://github.com/pantsbuild/pants/pull/14648Ā with the code that I have. If you have a moment to check it, and maybe help me to debug it it would be amazing šŸ™‚
šŸ™Œ 1
šŸ‘€ 1