Closed
Description
Given two python files with the same name, one with the .py extension and another with any other extension (e.g. .wsgi), pylint always reports issues only from the file with the .py extension.
This may be working as intended (see invoking pylint with a file) but a warning of some kind would be useful.
The workaround is to not use files with the same name, regardless of the file extensions.
Steps to reproduce
- Create two files with only the extension being different (my_script.py, my_script.wsgi)
- Edit the files with each a different pylint issue (e.g. import-error and trailing-newlines)
- Run pylint on each file, or on both files at once
- Notice pylint always reports the issue from my_script.py
Current behavior
Pylint reports issues from the file with the .py extension.
Expected behavior
Pylint reports issues from the exact file passed as argument.
OR
Pylint warns about file name collision.
pylint --version output
Python 3.8 on Windows
pylint 2.5.2
astroid 2.4.1
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)]
Python 3.7 on Linux Debian
pylint 2.5.0
astroid 2.4.0
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0]