You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# folder struct
./__init__.py
./a.py# same goes if a.py is in a subfolder# __init__.py is empty# a.py includes anything that may trigger an error report like:deffoo():
unused=1
Configuration
No response
Command used
pylint --recursive=y ./
Pylint output
None
Expected behavior
Should be like pylint a.py or pylint --recursive=y $(pwd)
************* Module testpy.a
a.py:1:0: C0114: Missing module docstring (missing-module-docstring)
a.py:1:0: C0116: Missing function or method docstring (missing-function-docstring)
a.py:1:0: C0104: Disallowed name "foo" (disallowed-name)
a.py:2:4: W0612: Unused variable 'unused' (unused-variable)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
I can track it to L146 at lint/expand_modules.py, where
if has_init or is_namespace or is_directory:
for subfilepath in modutils.get_module_files(
os.path.dirname(filepath), ignore_list, list_all=is_namespace
):
filepath is __init__.py and os.path.dirname(filepath) is empty str when the bug is triggered, but some valid path when it is normal.
CareF
changed the title
--recursive fail to parse folder with __init__.py at the root
--recursive fail to parse folder with __init__.py at the root when using relative path
Oct 31, 2023
Bug description
Configuration
No response
Command used
Pylint output
None
Expected behavior
Should be like
pylint a.py
orpylint --recursive=y $(pwd)
Pylint version
OS / Environment
MacOS
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: