Add new rule to check for useless quote escapes (#8630)

When using the autofixer for `Q000` it does not remove the backslashes
from quotes that no longer need escaping.

This new rule checks for such backslashes (regardless whether they come
from the autofixer or not) and can remove them.

fixes #8617
This commit is contained in:
Adrian 2023-11-13 22:59:37 +01:00 committed by GitHub
parent 534fc34f11
commit 16060670b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1048 additions and 19 deletions

View file

@ -76,6 +76,7 @@ KNOWN_FORMATTING_VIOLATIONS = [
"unexpected-spaces-around-keyword-parameter-equals",
"unicode-kind-prefix",
"unnecessary-class-parentheses",
"unnecessary-escaped-quote",
"useless-semicolon",
"whitespace-after-open-bracket",
"whitespace-before-close-bracket",