Request: Don't show PEP8 errors for tables of data
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Spyder with “Real-time code style analysis” turned on shows code style errors for tables of numbers that are formatted in a neat, readable way:
which encourages re-formatting them in a less readable way (which is contrary to the intent of PEP8):
These examples are from SciPy, for example. I asked if this exception could be added to the pycodestyle/pep8 library itself, but they will not add it. They say to use flake8
instead and modify its rules. It would be nice if something like this could be done in Spyder.
What steps reproduce the problem?
- Turn on real-time code style analysis
- Copy a numpy array from the interpreter to the code editor pane
- Save the file
What is the expected output? What do you see instead?
It shows code style problems for code that is more-readable, and does not show them for code that is less readable.
Versions
- Spyder version: 3.3.5
- Python version: 3.7.3 64-bit
- Qt version: 5.9.6
- PyQt version: 5.9.2
- Operating System name/version: Windows 7 Pro 64-bit
Dependencies
IPython >=4.0 : 7.6.1 (OK)
cython >=0.21 : 0.29.12 (OK)
jedi >=0.9.0 : 0.13.3 (OK)
matplotlib >=2.0.0: 3.0.3 (OK)
nbconvert >=4.0 : 5.5.0 (OK)
numpy >=1.7 : 1.16.2 (OK)
pandas >=0.13.1 : 0.24.2 (OK)
pycodestyle >=2.3 : 2.5.0 (OK)
pyflakes >=0.6.0 : 2.1.1 (OK)
pygments >=2.0 : 2.4.2 (OK)
pylint >=0.25 : 2.3.1 (OK)
qtconsole >=4.2.0 : 4.5.1 (OK)
rope >=0.9.4 : 0.14.0 (OK)
sphinx >=0.6.6 : 2.1.2 (OK)
sympy >=0.7.3 : 1.4 (OK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
PEP 8 – Style Guide for Python Code
Table of Contents ... And don't hesitate to ask! ... Python mandates that future-imports must appear in the module before any other code ......
Read more >python - VS Code doesn't recognize pep8 - Stack Overflow
I already installed Python for VSCode . and I installed flake8 , but I got same error. I'll add plugins info to my...
Read more >How to Write Beautiful Python Code With PEP 8 - Real Python
Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you...
Read more >Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >Long-awaited PEP 8 checks on the fly, improved doctest ...
I noticed that pep8 does show up in the code inspection tab. I had it set to ERROR so it under lines any...
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 Free
Top 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
Thanks for reporting. You’ll be able to select what pep8 message you want to see/hide in Spyder 4.
Not sure how we can handle this 😐