Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint . is inconsistent with pylint ../$(basename $(pwd)) #2593

Closed
tom-d opened this issue Nov 12, 2018 · 3 comments
Closed

pylint . is inconsistent with pylint ../$(basename $(pwd)) #2593

tom-d opened this issue Nov 12, 2018 · 3 comments
Labels

Comments

@tom-d
Copy link

tom-d commented Nov 12, 2018

Steps to reproduce

mkdir tmp
touch __init__.py
mkdir tmp/lib
echo 'a = b' > tmp/lib/__init__.py
cd tmp

Current behavior

pylint . && echo $?
0

pylint ../tmp
E0602: Undefined variable 'b' (undefined-variable)

(cd .. && pylint tmp)
E0602: Undefined variable 'b' (undefined-variable)

Expected behavior

pylint .
E0602: Undefined variable 'b' (undefined-variable)

pylint --version output

pylint 2.1.1
astroid 2.1.0-dev
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

@tom-d
Copy link
Author

tom-d commented Nov 12, 2018

correction to the above steps to reproduce..

mkdir tmp
touch tmp/__init__.py
mkdir tmp/lib
echo 'a = b' > tmp/lib/__init__.py
cd tmp

@PCManticore
Copy link
Contributor

Thanks for creating an issue @tom-d !

@Pierre-Sassoulas
Copy link
Member

This is fixed by using the --recursive=y option, and will be definitely fixed with #5701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants