Replies: 1 comment
-
|
IMO this is quite handy. I even added this functionality to the Ruff LSP a few years ago. I think it's common in IDEs.
For me it would not be an encouragement, I already avoid suppressions when possible, so this functionality will only make it slightly faster to do when necessary. I can understand this viewpoint though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview of Suppression Quick Fixes
The Pyrefly team has been thinking through adding suppression quick fixes into the IDE experience. These quick fixes would come in multiple forms.
One quickfix would allow adding suppressions to just one line at a time. Consider the following example
Before:
After:
The single line quickfix would allow you to add a suppression on line 2 where the bad assignment error is happening.
An extension of this would be a quick fix would be a quickfix that allows the user to suppress all errors in a file at one time.
Before:
After:
In this example, the whole file quickfix would add suppressions for both the bad assignment error as well as the bad return error simultaneously.
Debate over IDE quickfixes
The Pyrefly team has been debating the usefulness of this feature and we have decided to gather more opinions from the greater Pyrefly community. On we hand we feel that this could be a useful feature allowing adding quick suppressions rather than using
pyrefly suppressor writing in the suppressions manually. On the other hand we feel this might encourage liberal use of suppressions rather than fixing type errors. We want the Pyrefly experience to be one that leads to better use of types, not adding unecessary suppressions to a project.Your thoughts
If you have thoughts on suppression quick fixes, please share them below. We want to gather as much information as we can to make sure this feature serves users in a way which is the most helpful.
Beta Was this translation helpful? Give feedback.
All reactions