-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Hello,
I'm using the init-hook
to tell pylint where to find my librairies and it works fine in .pylintrc
but it's not working when I move the content of .pylintrc
in the setup.cfg
file
Steps to reproduce
- Checkout https://github.com/rdehouss/pylint-issue-init-hook-setup-cfg
- Install pylint with pipenv (pipenv install --dev)
- Execute
find . -name "*.py" -not -path '*/\.*' -exec pipenv run pylint --rcfile=.pylintrc '{}' +
=> OK - Execute
find . -name "*.py" -not -path '*/\.*' -exec pipenv run pylint --rcfile=setup.cfg '{}' +
=> NOK
Please note that the disable=missing-docstring
works well since when I remove it, I get
find . -name "*.py" -not -path '*/\.*' -exec pipenv run pylint --rcfile=setup.cfg '{}' +
************* Module src.hello_world
src/hello_world.py:1:0: C0111: Missing module docstring (missing-docstring)
src/hello_world.py:1:0: E0401: Unable to import 'libs.hello_world' (import-error)
************* Module src.libs.hello_world
src/libs/hello_world.py:1:0: C0111: Missing module docstring (missing-docstring)
src/libs/hello_world.py:1:0: C0111: Missing function docstring (missing-docstring)
-------------------------------------------------------------------
Your code has been rated at -6.00/10 (previous run: 0.00/10, -6.00)
Current behavior
init-hook
seems to have no effect
$ find . -name "*.py" -not -path '*/\.*' -exec pipenv run pylint --rcfile=.pylintrc '{}' +
------------------------------------
Your code has been rated at 10.00/10
$ find . -name "*.py" -not -path '*/\.*' -exec pipenv run pylint --rcfile=setup.cfg '{}' +
************* Module src.hello_world
src/hello_world.py:1:0: E0401: Unable to import 'libs.hello_world' (import-error)
--------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 10.00/10, -10.00)
Expected behavior
init-hook
works like when it is in .pylintrc
pylint --version output
pylint 2.2.2
astroid 2.1.0
Python 3.7.0 (default, Sep 18 2018, 18:47:22)
[Clang 9.1.0 (clang-902.0.39.2)]
Metadata
Metadata
Assignees
Labels
No labels