prospector icon indicating copy to clipboard operation
prospector copied to clipboard

[BUG] Different behaviour between pylint and prospector on python 3.7

Open michaelboulton opened this issue 6 years ago • 6 comments

Describe the bug Running prospector gives false positives with pylint, but running pylint alone does not

To Reproduce

  1. Creating a new python 3.7 virtualenv and just do pip install prospector

  2. Create a file eg example.py containing this:

def example(testarg, mark):  # pylint: disable=unused-argument
    raise Exception(mark)
  1. Running pylint example.py will cause no error, but doing prospector --tool pylint example.py will 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?

michaelboulton avatar Nov 25 '19 10:11 michaelboulton

Forgot to say, this also doesn't happen in Python 2.7

michaelboulton avatar Nov 25 '19 10:11 michaelboulton

This also seems to happen in 3.8

michaelboulton avatar Jan 25 '20 16:01 michaelboulton

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.

daheise avatar Feb 12 '20 21:02 daheise

@michaelboulton Can you confirm that this is no longer an issue in the latest pre-release version? 1.3.0.dev5

chocoelho avatar Jun 20 '20 20:06 chocoelho

@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.

chocoelho avatar Jun 20 '20 20:06 chocoelho

This issue persists in Python 3.10 with pylint 2.13.4.

Lx avatar Apr 16 '22 11:04 Lx