-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Autofix error] Invalid code produce autofix error #3622
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
It might be a bug that we're considering that |
I think |
I think it should, that was used as a workaround for a while for |
Ahh, the issue is |
The issue is here: Err(parse_error) => {
if settings.rules.enabled(Rule::SyntaxError) {
pycodestyle::rules::syntax_error(&mut diagnostics, &parse_error);
}
// If the syntax error is ignored, suppress it (regardless of whether
// `Rule::SyntaxError` is enabled).
if !rule_is_ignored(
Rule::SyntaxError,
parse_error.location.row(),
&directives.noqa_line_for,
locator,
) {
error = Some(parse_error);
}
} That needs to respect the whole file ignores, not just the inline ignores. |
Ruff a45753f
with
The text was updated successfully, but these errors were encountered: