Avoid noqa removal upon unhandled syntax errors (#2864)

This commit is contained in:
Charlie Marsh 2023-02-13 10:37:55 -05:00 committed by GitHub
parent 3c03e2cb2e
commit 7627e840c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,7 +211,7 @@ pub fn check_path(
indexer.commented_lines(),
&directives.noqa_line_for,
settings,
autofix,
error.as_ref().map_or(autofix, |_| flags::Autofix::Disabled),
);
}