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

After Analyze, hovering # pylint: disable= shows rule description #14067

Open
4 tasks done
PanderMusubi opened this issue Oct 26, 2020 · 1 comment
Open
4 tasks done

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. This feature request is to offer a rule description on hovering the rule in that comment.

The benefit is that a user can easily see which rule was disabled, especially when that was done a while back. Alternative is to remove the comment, run Analyze, look op the line in the output, undo removal of the comment, which is much more work.

What steps reproduce the problem?

  1. Open a Python file
  2. Run analyze with F8
  3. disable a reported rule in the specific line by adding PyLint disable comment at the end as shown above, e.g. pylint:disable=R1702
  4. Run analyze again, rule is no longer reported for that line
  5. Now, the user would like to see what the disabled rules was about, e.g. what R1702 means
  6. User hovers the mouse over only these characters in the comment R1702 (not the rest of the comment) and a description of the rule, as if the rule was shown in the Analyze (but without the line number), is shown.

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

Step six is the feature request, at the moment it is not yet shown. Note that multiple rules, comma- separated list, should be supported, e.g. # pylint: disable=R1702,R1703

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 suggestion @PanderMusubi! Unfortunately we don't have the bandwidth to implement it ourselves.

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

No branches or pull requests

2 participants