Pylint Inline Comment - Disabling statement doesn't work
See original GitHub issueDescription
What steps will reproduce the problem?
FileName: issue_sample.py
FileContent:
# pylint: disable=E501
print('lorem ipsum Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.')
Code Analysis is activated in the global spyder settings. I want now disable some linter options like “line to long” … I have added in the first line a pylint settings comment, but it doesn’t work. The editor is still showing the warning symbol, in the case of too long rows.
Is this a config/syntax issue from myside or an general defect/bug…
Please help!
thanks Marcus
Versions
- Spyder version: 3.3.1
- Python version: 3.6.5
- Qt version: 5.9.4
- PyQt5 version: 5.9.2
- Operating System: Darwin 17.7.0
Dependencies
pyflakes >=0.6.0 : 1.6.0 (OK)
pycodestyle >=2.3 : 2.4.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
sphinx >=0.6.6 : 1.7.4 (OK)
rope >=0.9.4 : 0.10.7 (OK)
jedi >=0.9.0 : 0.12.0 (OK)
psutil >=0.3 : 5.4.5 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
pandas >=0.13.1 : 0.23.0 (OK)
numpy >=1.7 : 1.14.3 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
cython >=0.21 : 0.28.2 (OK)
qtconsole >=4.2.0 : 4.3.1 (OK)
IPython >=4.0 : 6.4.0 (OK)
matplotlib >=2.0.0: 2.2.2 (OK)
pylint >=0.25 : 1.8.4 (OK)
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
How do I disable a Pylint warning? - python
These look like some statement # pylint: disable=broad-except (extra comment on the end of the original source line) and apply only to the...
Read more >Messages control - Pylint 2.16.0-dev documentation
This describes how the pragma controls operate at a code level. The pragma controls can disable / enable: All the violations on a...
Read more >How to ignore pylint problem for a specific single line of code
you can ignore it by adding a comment in the format # pylint: disable=[problem-code] at the end of the line where [problem-code] is...
Read more >Pylint features — Pylint 1.5.4 documentation
In Python 3 porting mode, all checkers will be disabled and only messages emitted ... Multiple imports on one line (%s) Used when...
Read more >Google Python Style Guide
Pylint disable comments. (e.g.: # pylint: disable=invalid-name ). Do not use backslash line continuation except for with statements requiring three or more ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are three things here:
Code Analysis
pane, where comments like# pylint: disable=E501
do have effect.# noqa
standard or# analysis:ignore
(which was supported in Spyder 3).Point 3 was reported on issue #11033, so I’m going to close this one as duplicate of that. And we plan to fix #11033 in 5.1.0, to be released at the end of July.
Your example works for me (E501), but “something like” it doesn’t.