Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable an Analyze rule for the reported line #14068

Open
4 tasks done
PanderMusubi opened this issue Oct 26, 2020 · 3 comments · May be fixed by #14327
Open
4 tasks done

Disable an Analyze rule for the reported line #14068

PanderMusubi opened this issue Oct 26, 2020 · 3 comments · May be fixed by #14327

Comments

@PanderMusubi
Copy link
Contributor

Issue 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 (or pip, if not using Anaconda)
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Analyzing code with Spyder can result in hints for Convention and Refactor, warnings and errors. The developer can disable a certain rule for a certain line of code by adding e.g. # pylint: disable=R1702 at the end of the line of code. Instead of typing this manually, the IDE can add it when the user right clicks the report for that line line and chooses "Disable in for this line".

The benefit is that a user doesn't need to remember the exact format for the comment that disables a report line.

What steps reproduce the problem?

  1. Open a Python file
  2. Run analyze with F8
  3. Right click on a reported rule and choose "Disable for this line"
  4. The line in code should get comment added on the end which disables Analyze for that rule for this line. The comments can look like # pylint: disable=R1702 or # pylint: disable=R1702,R1703 for more rules. Duplication of rules or disable comments may not occur.

What is the expected output? What do you see instead?

This is a feature request and what is in step 4 should happen, but doens't yet.

Versions

  • Spyder version: 4.1.5 None
  • Python version: 3.8.6 64-bit
  • Qt version: 5.12.9
  • PyQt5 version: 5.12.3
  • Operating System: Linux 5.8.0-7625-generic Ubuntu 20.10
@ccordoba12
Copy link
Member

Thanks for the you suggestion @PanderMusubi! Unfortunately, we don't have time to implement this right now, sorry.

@agusgs
Copy link

agusgs commented Nov 12, 2020

Hello there.
I would like to give it a try. If anyone has any clue or suggestion on where to start, I'll be thankful

@PanderMusubi
Copy link
Contributor Author

See also #14067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants