[BUG] Different behaviour between pylint and prospector on python 3.7
Describe the bug Running prospector gives false positives with pylint, but running pylint alone does not
To Reproduce
-
Creating a new python 3.7 virtualenv and just do
pip install prospector -
Create a file eg
example.pycontaining this:
def example(testarg, mark): # pylint: disable=unused-argument
raise Exception(mark)
- Running
pylint example.pywill cause no error, but doingprospector --tool pylint example.pywill give a "useless suppression" error
Expected behavior No false positive reported by prospector
Environment (please complete the following information):
- OS: linunx
- Tool: pylint
- Prospector version: 1.1.7
- Python version: 3.7.4
It also seems like this only happens on 3.7 - it doesn't give this error on python 3.6. Haven't had the chance to try python 3.8 yet.
I can give my pylint/prospector config files but it seems like the issue isn't related to configuration?
Forgot to say, this also doesn't happen in Python 2.7
This also seems to happen in 3.8
I don't know if this is related, but I just discovered an issue where prospector gives different output depending on the way a file path is given to it.
If I give it prospector directory/script.py I get no error from pyflakes.
If I give it prospector ./directory/script.py I do get a pyflakes error.
@michaelboulton Can you confirm that this is no longer an issue in the latest pre-release version? 1.3.0.dev5
@daheise it's better to open another issue with a sandbox example for me to try it out and fix it for the next release.
This issue persists in Python 3.10 with pylint 2.13.4.