Skip to content

Commit 10746c6

Browse files
committed
revert other test changes
1 parent 62f2e10 commit 10746c6

2 files changed

Lines changed: 0 additions & 128 deletions

File tree

crates/ruff_linter/resources/test/fixtures/pyflakes/F523.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,3 @@
4343
# The fix here is safe because the unused argument has no side effect,
4444
# even though the used argument has a side effect
4545
"Hello, {0}".format(print(1), "Pikachu")
46-
47-
# https://github.com/astral-sh/ruff/issues/15557
48-
# When the receiver string has no braces, `.format()` is a no-op and the call is
49-
# dropped. When the string contains any `{` or `}`, the now-argumentless
50-
# `.format()` call is kept so that runtime behaviour, including any `KeyError`,
51-
# is preserved.
52-
"{{".format("!")
53-
"{x}".format("!")
54-
"{{}}".format("!")
55-
"{{0}}".format("!")
56-
"{x}".format("!", x=1)
57-
("Hello" "world").format("!")

crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F523_F523.py.snap

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -332,126 +332,10 @@ F523 [*] `.format` call has unused arguments at position(s): 1
332332
44 | # even though the used argument has a side effect
333333
45 | "Hello, {0}".format(print(1), "Pikachu")
334334
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
335-
46 |
336-
47 | # https://github.com/astral-sh/ruff/issues/15557
337335
|
338336
help: Remove extra positional arguments at position(s): 1
339337
42 |
340338
43 | # The fix here is safe because the unused argument has no side effect,
341339
44 | # even though the used argument has a side effect
342340
- "Hello, {0}".format(print(1), "Pikachu")
343341
45 + "Hello, {0}".format(print(1), )
344-
46 |
345-
47 | # https://github.com/astral-sh/ruff/issues/15557
346-
48 | # When the receiver string has no braces, `.format()` is a no-op and the call is
347-
348-
F523 [*] `.format` call has unused arguments at position(s): 0
349-
--> F523.py:52:1
350-
|
351-
50 | # `.format()` call is kept so that runtime behaviour, including any `KeyError`,
352-
51 | # is preserved.
353-
52 | "{{".format("!")
354-
| ^^^^^^^^^^^^^^^^
355-
53 | "{x}".format("!")
356-
54 | "{{}}".format("!")
357-
|
358-
help: Remove extra positional arguments at position(s): 0
359-
49 | # dropped. When the string contains any `{` or `}`, the now-argumentless
360-
50 | # `.format()` call is kept so that runtime behaviour, including any `KeyError`,
361-
51 | # is preserved.
362-
- "{{".format("!")
363-
52 + "{{".format()
364-
53 | "{x}".format("!")
365-
54 | "{{}}".format("!")
366-
55 | "{{0}}".format("!")
367-
368-
F523 [*] `.format` call has unused arguments at position(s): 0
369-
--> F523.py:53:1
370-
|
371-
51 | # is preserved.
372-
52 | "{{".format("!")
373-
53 | "{x}".format("!")
374-
| ^^^^^^^^^^^^^^^^^
375-
54 | "{{}}".format("!")
376-
55 | "{{0}}".format("!")
377-
|
378-
help: Remove extra positional arguments at position(s): 0
379-
50 | # `.format()` call is kept so that runtime behaviour, including any `KeyError`,
380-
51 | # is preserved.
381-
52 | "{{".format("!")
382-
- "{x}".format("!")
383-
53 + "{x}".format()
384-
54 | "{{}}".format("!")
385-
55 | "{{0}}".format("!")
386-
56 | "{x}".format("!", x=1)
387-
388-
F523 [*] `.format` call has unused arguments at position(s): 0
389-
--> F523.py:54:1
390-
|
391-
52 | "{{".format("!")
392-
53 | "{x}".format("!")
393-
54 | "{{}}".format("!")
394-
| ^^^^^^^^^^^^^^^^^^
395-
55 | "{{0}}".format("!")
396-
56 | "{x}".format("!", x=1)
397-
|
398-
help: Remove extra positional arguments at position(s): 0
399-
51 | # is preserved.
400-
52 | "{{".format("!")
401-
53 | "{x}".format("!")
402-
- "{{}}".format("!")
403-
54 + "{{}}".format()
404-
55 | "{{0}}".format("!")
405-
56 | "{x}".format("!", x=1)
406-
57 | ("Hello" "world").format("!")
407-
408-
F523 [*] `.format` call has unused arguments at position(s): 0
409-
--> F523.py:55:1
410-
|
411-
53 | "{x}".format("!")
412-
54 | "{{}}".format("!")
413-
55 | "{{0}}".format("!")
414-
| ^^^^^^^^^^^^^^^^^^^
415-
56 | "{x}".format("!", x=1)
416-
57 | ("Hello" "world").format("!")
417-
|
418-
help: Remove extra positional arguments at position(s): 0
419-
52 | "{{".format("!")
420-
53 | "{x}".format("!")
421-
54 | "{{}}".format("!")
422-
- "{{0}}".format("!")
423-
55 + "{{0}}".format()
424-
56 | "{x}".format("!", x=1)
425-
57 | ("Hello" "world").format("!")
426-
427-
F523 [*] `.format` call has unused arguments at position(s): 0
428-
--> F523.py:56:1
429-
|
430-
54 | "{{}}".format("!")
431-
55 | "{{0}}".format("!")
432-
56 | "{x}".format("!", x=1)
433-
| ^^^^^^^^^^^^^^^^^^^^^^
434-
57 | ("Hello" "world").format("!")
435-
|
436-
help: Remove extra positional arguments at position(s): 0
437-
53 | "{x}".format("!")
438-
54 | "{{}}".format("!")
439-
55 | "{{0}}".format("!")
440-
- "{x}".format("!", x=1)
441-
56 + "{x}".format(x=1)
442-
57 | ("Hello" "world").format("!")
443-
444-
F523 [*] `.format` call has unused arguments at position(s): 0
445-
--> F523.py:57:1
446-
|
447-
55 | "{{0}}".format("!")
448-
56 | "{x}".format("!", x=1)
449-
57 | ("Hello" "world").format("!")
450-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
451-
|
452-
help: Remove extra positional arguments at position(s): 0
453-
54 | "{{}}".format("!")
454-
55 | "{{0}}".format("!")
455-
56 | "{x}".format("!", x=1)
456-
- ("Hello" "world").format("!")
457-
57 + "Hello" "world"

0 commit comments

Comments
 (0)