Skip to content

--recursive fail to parse folder with __init__.py at the root when using relative path #9210

Closed
@CareF

Description

@CareF

Bug description

# 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:

def foo():
    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)

Pylint version

pylint 3.0.2
astroid 3.0.1
Python 3.11.6 (main, Oct  2 2023, 20:46:17) [Clang 14.0.0 (clang-1400.0.29.202)]

OS / Environment

MacOS

Additional dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions