You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I really like about mypy and pylint over e.g. flake8 is that it has names for its errors, which can also be used to ignore them.
If I read # noqa: FURB125, I have no idea what that's supposed to mean without having to look things up. Similarly, if I write a config file, it needs lots of comments to point out what checks I'm disabling/enabling there.
If, however, I see # noqa: furb-no-trailing-return, or somesuch, that makes things much cleaner.
The text was updated successfully, but these errors were encountered:
I think giving names to checks would be a good idea! I agree that FURB125 is a lot less readable compared to furb-no-trailing-return or the like. It also makes it easier on developers who want to talk about a certain check since they don't have to look up the error code beforehand.
I think this would be pretty easy, basically we would just modify the ErrorInfo classes like so:
@dataclassclassErrorInfo(Error):
""" docstring here """name="no-trailing-return"# add this linecode=125msg: str="Return is redundant here"
And since the suffix defaults to FURB, we can append furb- to some list for doing lookups later. Then, you would just do:
One thing I really like about mypy and pylint over e.g. flake8 is that it has names for its errors, which can also be used to ignore them.
If I read
# noqa: FURB125
, I have no idea what that's supposed to mean without having to look things up. Similarly, if I write a config file, it needs lots of comments to point out what checks I'm disabling/enabling there.If, however, I see
# noqa: furb-no-trailing-return
, or somesuch, that makes things much cleaner.The text was updated successfully, but these errors were encountered: