From 432f71180b59d79544eb2a9fa2195eae3e059ef9 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 24 Oct 2025 00:06:02 -0400 Subject: [PATCH] Fix merge conflict --- ...ke8_simplify__tests__SIM905_SIM905.py.snap | 77 ++++++++++++++++- ...ify__tests__preview__SIM905_SIM905.py.snap | 83 ++++++++++++++++++- 2 files changed, 158 insertions(+), 2 deletions(-) diff --git a/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__SIM905_SIM905.py.snap b/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__SIM905_SIM905.py.snap index 2cadf0ceb9..961048deeb 100644 --- a/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__SIM905_SIM905.py.snap +++ b/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__SIM905_SIM905.py.snap @@ -1302,7 +1302,7 @@ help: Replace with list literal - 'no need' to escape - "swap" quote style - "use' ugly triple quotes""".split("\n") -160 + [r"first", r"'no need' to escape", r'"swap" quote style', r""""use' ugly triple quotes"""] +160 + [r"first", r"'no need' to escape", r'"swap" quote style', '"use\' ugly triple quotes'] 161 | 162 | # https://github.com/astral-sh/ruff/issues/19845 163 | print("S\x1cP\x1dL\x1eI\x1fT".split()) @@ -1394,5 +1394,80 @@ SIM905 Consider using a list literal instead of `str.split` 172 | " a b c d ".rsplit(maxsplit=2) # [" a b", "c", "d"] 173 | "a b".split(maxsplit=1) # ["a", "b"] | ^^^^^^^^^^^^^^^^^^^^^^^^ +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 | help: Replace with list literal + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:176:1 + | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] + | ^^^^^^^^^^^^^^^^^^^^ +177 | r"" "\"".split("1") # ['"'] +178 | r"1" """ + | +help: Replace with list literal +173 | "a b".split(maxsplit=1) # ["a", "b"] +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 + - r"1" "\n".split("1") # [r"", "\n"] +176 + [r"", '\n'] # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:177:1 + | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] + | ^^^^^^^^^^^^^^^^^^^ +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] + | +help: Replace with list literal +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] + - r"" "\"".split("1") # ['"'] +177 + [r'"'] # ['"'] +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] +180 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:178:1 + | +176 | r"1" "\n".split("1") # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] +178 | / r"1" """ +179 | | """.split("1") # [r"", "\n"] + | |______________^ +180 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + | +help: Replace with list literal +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] + - r"1" """ + - """.split("1") # [r"", "\n"] +178 + [r"", '\n'] # [r"", "\n"] +179 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:180:1 + | +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] +180 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: Replace with list literal +177 | r"" "\"".split("1") # ['"'] +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] + - r"\n" "\n'\"".split("1") # ["\\n\n'\""] +180 + ['\\n\n\'"'] # ["\\n\n'\""] diff --git a/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__preview__SIM905_SIM905.py.snap b/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__preview__SIM905_SIM905.py.snap index d477367205..d224c4581f 100644 --- a/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__preview__SIM905_SIM905.py.snap +++ b/crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__preview__SIM905_SIM905.py.snap @@ -1350,7 +1350,7 @@ help: Replace with list literal - 'no need' to escape - "swap" quote style - "use' ugly triple quotes""".split("\n") -160 + [r"first", r"'no need' to escape", r'"swap" quote style', r""""use' ugly triple quotes"""] +160 + [r"first", r"'no need' to escape", r'"swap" quote style', '"use\' ugly triple quotes'] 161 | 162 | # https://github.com/astral-sh/ruff/issues/19845 163 | print("S\x1cP\x1dL\x1eI\x1fT".split()) @@ -1430,6 +1430,7 @@ help: Replace with list literal 171 + ["a", "b", "c d "] # ["a", "b", "c d "] 172 | " a b c d ".rsplit(maxsplit=2) # [" a b", "c", "d"] 173 | "a b".split(maxsplit=1) # ["a", "b"] +174 | SIM905 [*] Consider using a list literal instead of `str.rsplit` --> SIM905.py:172:1 @@ -1447,6 +1448,8 @@ help: Replace with list literal - " a b c d ".rsplit(maxsplit=2) # [" a b", "c", "d"] 172 + [" a b", "c", "d"] # [" a b", "c", "d"] 173 | "a b".split(maxsplit=1) # ["a", "b"] +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 SIM905 [*] Consider using a list literal instead of `str.split` --> SIM905.py:173:1 @@ -1455,6 +1458,8 @@ SIM905 [*] Consider using a list literal instead of `str.split` 172 | " a b c d ".rsplit(maxsplit=2) # [" a b", "c", "d"] 173 | "a b".split(maxsplit=1) # ["a", "b"] | ^^^^^^^^^^^^^^^^^^^^^^^^ +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 | help: Replace with list literal 170 | # leading/trailing whitespace should not count towards maxsplit @@ -1462,3 +1467,79 @@ help: Replace with list literal 172 | " a b c d ".rsplit(maxsplit=2) # [" a b", "c", "d"] - "a b".split(maxsplit=1) # ["a", "b"] 173 + ["a", "b"] # ["a", "b"] +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:176:1 + | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] + | ^^^^^^^^^^^^^^^^^^^^ +177 | r"" "\"".split("1") # ['"'] +178 | r"1" """ + | +help: Replace with list literal +173 | "a b".split(maxsplit=1) # ["a", "b"] +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 + - r"1" "\n".split("1") # [r"", "\n"] +176 + [r"", '\n'] # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:177:1 + | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] + | ^^^^^^^^^^^^^^^^^^^ +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] + | +help: Replace with list literal +174 | +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] + - r"" "\"".split("1") # ['"'] +177 + [r'"'] # ['"'] +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] +180 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:178:1 + | +176 | r"1" "\n".split("1") # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] +178 | / r"1" """ +179 | | """.split("1") # [r"", "\n"] + | |______________^ +180 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + | +help: Replace with list literal +175 | # https://github.com/astral-sh/ruff/issues/19610 +176 | r"1" "\n".split("1") # [r"", "\n"] +177 | r"" "\"".split("1") # ['"'] + - r"1" """ + - """.split("1") # [r"", "\n"] +178 + [r"", '\n'] # [r"", "\n"] +179 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + +SIM905 [*] Consider using a list literal instead of `str.split` + --> SIM905.py:180:1 + | +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] +180 | r"\n" "\n'\"".split("1") # ["\\n\n'\""] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: Replace with list literal +177 | r"" "\"".split("1") # ['"'] +178 | r"1" """ +179 | """.split("1") # [r"", "\n"] + - r"\n" "\n'\"".split("1") # ["\\n\n'\""] +180 + ['\\n\n\'"'] # ["\\n\n'\""]