Skip to content

Commit

Permalink
Abbreviate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jan 22, 2024
1 parent 993fb55 commit a903bdf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Violation for MutableFromkeysValue {
}

fn fix_title(&self) -> Option<String> {
Some("Replace with a comprehension".to_string())
Some("Replace with comprehension".to_string())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUF024.py:9:1: RUF024 [*] Do not pass mutable objects as values to `dict.fromkey
10 | dict.fromkeys(pierogi_fillings, list())
11 | dict.fromkeys(pierogi_fillings, {})
|
= help: Replace with a comprehension to generate distinct values
= help: Replace with comprehension

Unsafe fix
6 6 | ]
Expand All @@ -30,7 +30,7 @@ RUF024.py:10:1: RUF024 [*] Do not pass mutable objects as values to `dict.fromke
11 | dict.fromkeys(pierogi_fillings, {})
12 | dict.fromkeys(pierogi_fillings, set())
|
= help: Replace with a comprehension to generate distinct values
= help: Replace with comprehension

Unsafe fix
7 7 |
Expand All @@ -51,7 +51,7 @@ RUF024.py:11:1: RUF024 [*] Do not pass mutable objects as values to `dict.fromke
12 | dict.fromkeys(pierogi_fillings, set())
13 | dict.fromkeys(pierogi_fillings, {"pre": "populated!"})
|
= help: Replace with a comprehension to generate distinct values
= help: Replace with comprehension

Unsafe fix
8 8 | # Errors.
Expand All @@ -72,7 +72,7 @@ RUF024.py:12:1: RUF024 [*] Do not pass mutable objects as values to `dict.fromke
13 | dict.fromkeys(pierogi_fillings, {"pre": "populated!"})
14 | dict.fromkeys(pierogi_fillings, dict())
|
= help: Replace with a comprehension to generate distinct values
= help: Replace with comprehension

Unsafe fix
9 9 | dict.fromkeys(pierogi_fillings, [])
Expand All @@ -92,7 +92,7 @@ RUF024.py:13:1: RUF024 [*] Do not pass mutable objects as values to `dict.fromke
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF024
14 | dict.fromkeys(pierogi_fillings, dict())
|
= help: Replace with a comprehension to generate distinct values
= help: Replace with comprehension

Unsafe fix
10 10 | dict.fromkeys(pierogi_fillings, list())
Expand All @@ -113,7 +113,7 @@ RUF024.py:14:1: RUF024 [*] Do not pass mutable objects as values to `dict.fromke
15 |
16 | # Okay.
|
= help: Replace with a comprehension to generate distinct values
= help: Replace with comprehension

Unsafe fix
11 11 | dict.fromkeys(pierogi_fillings, {})
Expand Down

0 comments on commit a903bdf

Please sign in to comment.