[pylint] Supress PLE2510/2512/2513/2514/2515 autofix if the text contains an odd number of backslashes (#18856)

Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
Victor Hugo Gomes 2025-06-23 05:11:51 -03:00 committed by GitHub
parent 96660d93ca
commit 659ecba477
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 13 additions and 8 deletions

View file

@ -232,14 +232,10 @@ if True:
#[test]
fn quick_test() {
let source = r#"
def main() -> None:
if True:
some_very_long_variable_name_abcdefghijk = Foo()
some_very_long_variable_name_abcdefghijk = some_very_long_variable_name_abcdefghijk[
some_very_long_variable_name_abcdefghijk.some_very_long_attribute_name
== "This is a very long string abcdefghijk"
]
def hello(): ...
@lambda _, /: _
class A: ...
"#;
let source_type = PySourceType::Python;