bitter-ability-32190
11/10/2021, 8:53 PMa/
├─ b/
│ ├─ c/
│ │ ├─ d/
│ │ │ ├─ __init__py
│ │ ├─ foo.py
# foo.py
from a.b.c import d
Running pylint
from inside pants
gives: E0611(no-name-in-module), ] No name 'd' in module 'a.b.c'
But running pylint
on the file doesn't have the issue.
Setting [python-infer].inits=true
doesn't seem to alleviate the issue./pants peek a/b/c/foo.py
doesn't show d
as a dependency.hundreds-father-404
11/10/2021, 8:54 PMd/__init__.py
?bitter-ability-32190
11/10/2021, 8:55 PMfrom typing import Any, Callable
def apply(f: Callable, *args: Any, **kwargs: Any) -> Any:
return f(*args, **kwargs)
hundreds-father-404
11/10/2021, 8:56 PMa.b.c.d
?bitter-ability-32190
11/10/2021, 8:57 PMfoo.py
ishundreds-father-404
11/10/2021, 8:57 PMa/b/c/d
?bitter-ability-32190
11/10/2021, 8:58 PMtailor
isn't __init__.py
-aware?[python-infer].inits
? (In which case I ran tailor
with it off initially)hundreds-father-404
11/10/2021, 9:00 PM[python].ignore_solitary_init_files
..= false
under [python]
(if on Pants 2.8)
would you be willing to open a bug report please? that's super confusing this happpened__init__.py
It should probably instead detect if the __init__.py
is empty or notbitter-ability-32190
11/10/2021, 9:02 PMhundreds-father-404
11/10/2021, 9:54 PMbitter-ability-32190
11/10/2021, 10:00 PMbusy-vase-39202
11/10/2021, 10:11 PM