Skip to content

Commit

Permalink
add a case that deletes the whole comment
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Mar 31, 2024
1 parent 15fbed1 commit b56aa02
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ def f():
def f():
# Invalid - nonexistant error code with multibyte character
d = 1 #…noqa: F841, E50
e = 1 #…noqa: E50
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ RUF100_0.py:107:12: RUF100 [*] Unused `noqa` directive (unknown: `E50`)
106 | # Invalid - nonexistant error code with multibyte character
107 | d = 1noqa: F841, E50
| ^^^^^^^^^^^^^^^^ RUF100
108 | e = 1noqa: E50
|
= help: Remove unused `noqa` directive

Expand All @@ -299,3 +300,35 @@ RUF100_0.py:107:12: RUF100 [*] Unused `noqa` directive (unknown: `E50`)
106 106 | # Invalid - nonexistant error code with multibyte character
107 |- d = 1noqa: F841, E50
107 |+ d = 1 # noqa: F841
108 108 | e = 1noqa: E50

RUF100_0.py:108:5: F841 [*] Local variable `e` is assigned to but never used
|
106 | # Invalid - nonexistant error code with multibyte character
107 | d = 1noqa: F841, E50
108 | e = 1noqa: E50
| ^ F841
|
= help: Remove assignment to unused variable `e`

Unsafe fix
105 105 | def f():
106 106 | # Invalid - nonexistant error code with multibyte character
107 107 | d = 1noqa: F841, E50
108 |- e = 1noqa: E50

RUF100_0.py:108:12: RUF100 [*] Unused `noqa` directive (unknown: `E50`)
|
106 | # Invalid - nonexistant error code with multibyte character
107 | d = 1noqa: F841, E50
108 | e = 1noqa: E50
| ^^^^^^^^^^ RUF100
|
= help: Remove unused `noqa` directive

Safe fix
105 105 | def f():
106 106 | # Invalid - nonexistant error code with multibyte character
107 107 | d = 1noqa: F841, E50
108 |- e = 1noqa: E50
108 |+ e = 1
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ RUF100_0.py:107:12: RUF100 [*] Unused `noqa` directive (unknown: `E50`)
106 | # Invalid - nonexistant error code with multibyte character
107 | d = 1noqa: F841, E50
| ^^^^^^^^^^^^^^^^ RUF100
108 | e = 1noqa: E50
|
= help: Remove unused `noqa` directive

Expand All @@ -279,3 +280,35 @@ RUF100_0.py:107:12: RUF100 [*] Unused `noqa` directive (unknown: `E50`)
106 106 | # Invalid - nonexistant error code with multibyte character
107 |- d = 1noqa: F841, E50
107 |+ d = 1 # noqa: F841
108 108 | e = 1noqa: E50

RUF100_0.py:108:5: F841 [*] Local variable `e` is assigned to but never used
|
106 | # Invalid - nonexistant error code with multibyte character
107 | d = 1noqa: F841, E50
108 | e = 1noqa: E50
| ^ F841
|
= help: Remove assignment to unused variable `e`

Unsafe fix
105 105 | def f():
106 106 | # Invalid - nonexistant error code with multibyte character
107 107 | d = 1noqa: F841, E50
108 |- e = 1noqa: E50

RUF100_0.py:108:12: RUF100 [*] Unused `noqa` directive (unknown: `E50`)
|
106 | # Invalid - nonexistant error code with multibyte character
107 | d = 1noqa: F841, E50
108 | e = 1noqa: E50
| ^^^^^^^^^^ RUF100
|
= help: Remove unused `noqa` directive

Safe fix
105 105 | def f():
106 106 | # Invalid - nonexistant error code with multibyte character
107 107 | d = 1noqa: F841, E50
108 |- e = 1noqa: E50
108 |+ e = 1

0 comments on commit b56aa02

Please sign in to comment.