Closed
Description
For a particular warning in disable pragma, pylint fails to parse the identifier string. The warning comes from a plugin (pocketlint) and is called found-_-in-module-class
(note underscore). Instead of disabling, E0012 is emitted and the disable does not happen (obviously). Once the disable is changed to use the numeric identifier W9902
, the issue goes away.
This regression appeared after updating pylint from 2.4.4. to 2.5.0.
Steps to reproduce
- pip3 install --user pocketlint
- pip3 install --user pylint==2.5.0
- git clone [email protected]:rhinstaller/anaconda.git
- cd anaconda
- git checkout anaconda-33.13-1
- PYTHONPATH=`pwd` python3 -m pylint --rcfile tests/pylint/pylintrc anaconda.py
- Replace
found-_-in-module-class
in the indicated line withW9902
- PYTHONPATH=`pwd` python3 -m pylint --rcfile tests/pylint/pylintrc anaconda.py
Current behavior
Buggy behavior:
E0012(bad-option-value):anaconda.py:379,0: : Bad option value 'found-'
E0012(bad-option-value):anaconda.py:379,0: : Bad option value '-in-module-class'
W9902(found-_-in-module-class):anaconda.py:381,57: : Found _ call at module/class level
W9902(found-_-in-module-class):anaconda.py:382,35: : Found _ call at module/class level
After replacing:
(no output)
See relevant files:
- Reported error location: https://github.com/rhinstaller/anaconda/blob/master/anaconda.py#L379
- Definition of the message: https://github.com/rhinstaller/pocketlint/blob/master/pocketlint/checkers/intl.py#L66
Expected behavior
No output
pylint --version output
$ python3 -m pylint --version
pylint 2.5.0
astroid 2.4.1
Python 3.7.7 (default, Mar 13 2020, 21:39:43)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
Metadata
Metadata
Assignees
Labels
No labels