diff options
author | Craig Citro <craigcitro@gmail.com> | 2017-05-22 05:42:45 -0700 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-05-22 14:42:45 +0200 |
commit | d03b949b64ed2d4755c556a4cabb6f5acc70487b (patch) | |
tree | 076f6b5f544cf739674222ef99389f17e085de9f /pylint/pyreverse/diadefslib.py | |
parent | da7566aede3ef98278e9b1b350f6e0a8ea3fd1d7 (diff) | |
download | pylint-git-d03b949b64ed2d4755c556a4cabb6f5acc70487b.tar.gz |
Use the full filename for identifying __init__.py. (#1461)
Previously, `pylint.utils.expand_modules` identified `__init__.py` files by a
substring match, which led to false positives for files with names like
`flycheck__init__.py`. (While users are unlikely to choose such a filename,
tools like flycheck use these sorts of filenames for temporary files.)
The result was that `pylint` would end up linting the entire package, not just
the file in question.
The fix is straightforward -- we use `os.path.basename` instead of a substring
check, and add a test.
Diffstat (limited to 'pylint/pyreverse/diadefslib.py')
0 files changed, 0 insertions, 0 deletions