@@ -1402,6 +1402,8 @@ SIM905 [*] Consider using a list literal instead of `str.split`
1402
1402
162 | | " swap" quote style
1403
1403
163 | | " use' ugly triple quotes" " " .split (" \n " )
1404
1404
| | _______________________________________ ^
1405
+ 164 |
1406
+ 165 | # https :// github.com/astral-sh/ruff/issues/19845
1405
1407
|
1406
1408
help : Replace with list literal
1407
1409
@@ -1414,3 +1416,62 @@ help: Replace with list literal
1414
1416
162 | - " swap" quote style
1415
1417
163 | - " use' ugly triple quotes" " " .split (" \n " )
1416
1418
160 | + [r " first" , r " 'no need' to escape" , r ' "swap" quote style' , r " " " " use ' ugly triple quotes"""]
1419
+ 164 161 |
1420
+ 165 162 | # https :// github.com/astral-sh/ruff/issues/19845
1421
+ 166 163 | print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1422
+
1423
+ SIM905 [* ] Consider using a list literal instead of ` str.split`
1424
+ -- > SIM905 .py :166 :7
1425
+ |
1426
+ 165 | # https :// github.com/astral-sh/ruff/issues/19845
1427
+ 166 | print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1428
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1429
+ 167 | print (" \x1c\x1d\x1e\x1f >" .split (maxsplit = 0 ))
1430
+ 168 | print (" <\x1c\x1d\x1e\x1f " .rsplit (maxsplit = 0 ))
1431
+ |
1432
+ help : Replace with list literal
1433
+
1434
+ ℹ Safe fix
1435
+ 163 163 | " use' ugly triple quotes" " " .split (" \n " )
1436
+ 164 164 |
1437
+ 165 165 | # https :// github.com/astral-sh/ruff/issues/19845
1438
+ 166 | - print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1439
+ 166 | + print ([" S" , " P" , " L" , " I" , " T" ])
1440
+ 167 167 | print (" \x1c\x1d\x1e\x1f >" .split (maxsplit = 0 ))
1441
+ 168 168 | print (" <\x1c\x1d\x1e\x1f " .rsplit (maxsplit = 0 ))
1442
+
1443
+ SIM905 [* ] Consider using a list literal instead of ` str.split`
1444
+ -- > SIM905 .py :167 :7
1445
+ |
1446
+ 165 | # https :// github.com/astral-sh/ruff/issues/19845
1447
+ 166 | print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1448
+ 167 | print (" \x1c\x1d\x1e\x1f >" .split (maxsplit = 0 ))
1449
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450
+ 168 | print (" <\x1c\x1d\x1e\x1f " .rsplit (maxsplit = 0 ))
1451
+ |
1452
+ help : Replace with list literal
1453
+
1454
+ ℹ Safe fix
1455
+ 164 164 |
1456
+ 165 165 | # https :// github.com/astral-sh/ruff/issues/19845
1457
+ 166 166 | print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1458
+ 167 | - print (" \x1c\x1d\x1e\x1f >" .split (maxsplit = 0 ))
1459
+ 167 | + print ([" >" ])
1460
+ 168 168 | print (" <\x1c\x1d\x1e\x1f " .rsplit (maxsplit = 0 ))
1461
+
1462
+ SIM905 [* ] Consider using a list literal instead of ` str.split`
1463
+ -- > SIM905 .py :168 :7
1464
+ |
1465
+ 166 | print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1466
+ 167 | print (" \x1c\x1d\x1e\x1f >" .split (maxsplit = 0 ))
1467
+ 168 | print (" <\x1c\x1d\x1e\x1f " .rsplit (maxsplit = 0 ))
1468
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1469
+ |
1470
+ help : Replace with list literal
1471
+
1472
+ ℹ Safe fix
1473
+ 165 165 | # https :// github.com/astral-sh/ruff/issues/19845
1474
+ 166 166 | print (" S\x1c P\x1d L\x1e I\x1f T" .split ())
1475
+ 167 167 | print (" \x1c\x1d\x1e\x1f >" .split (maxsplit = 0 ))
1476
+ 168 | - print (" <\x1c\x1d\x1e\x1f " .rsplit (maxsplit = 0 ))
1477
+ 168 | + print ([" <" ])
0 commit comments