-
Notifications
You must be signed in to change notification settings - Fork 174
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
Ignore the blended messages #722
base: master
Are you sure you want to change the base?
Conversation
e232918
to
4b1f364
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great !
_PYLINT_EQUIVALENTS = { | ||
# TODO: blending has this info already? | ||
"unused-import": ( | ||
("pyflakes", "FL0001"), | ||
("frosted", "E101"), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup.
prospector/tools/ruff/__init__.py
Outdated
_IGNORE_RE = re.compile(r"#\s*noqa:([^#]*[^# ])(?:\s*#.*)?$", re.IGNORECASE) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to add this to the ToolBase class for clarity ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is nice but I meant add the regex as an attribute in the ToolBase class to specify the regex for a tool noqa/disable explicitly (make it part of the ToolBase's API instead of creating a constant for each tool).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the new commit?
I'm nor relay convinced, but it does the job :-)
(I should update the tests!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap ! My reasoning is that the regex is strongly linked to a particular tool, but I don't mind if you revert, it's a nit.
4b1f364
to
8930755
Compare
Description
When one of the blended messages is ignored, ignore the other.
Related Issue
Fix #720
Motivation and Context
How Has This Been Tested?
New tests added
Types of changes