---
source: crates/ruff/src/rules/flake8_raise/mod.rs
---
RSE102.py:5:21: RSE102 [*] Unnecessary parentheses on raised exception
  |
5 | except TypeError:
6 |     # RSE102
7 |     raise ValueError()
  |                     ^^ RSE102
8 | 
9 | try:
  |
  = help: Remove unnecessary parentheses

ℹ Suggested fix
2 2 |     y = 6 + "7"
3 3 | except TypeError:
4 4 |     # RSE102
5   |-    raise ValueError()
  5 |+    raise ValueError
6 6 | 
7 7 | try:
8 8 |     x = 1 / 0

RSE102.py:13:16: RSE102 [*] Unnecessary parentheses on raised exception
   |
13 | # RSE102
14 | raise TypeError()
   |                ^^ RSE102
15 | 
16 | # RSE102
   |
   = help: Remove unnecessary parentheses

ℹ Suggested fix
10 10 |     raise
11 11 | 
12 12 | # RSE102
13    |-raise TypeError()
   13 |+raise TypeError
14 14 | 
15 15 | # RSE102
16 16 | raise TypeError ()

RSE102.py:16:17: RSE102 [*] Unnecessary parentheses on raised exception
   |
16 | # RSE102
17 | raise TypeError ()
   |                 ^^ RSE102
18 | 
19 | # RSE102
   |
   = help: Remove unnecessary parentheses

ℹ Suggested fix
13 13 | raise TypeError()
14 14 | 
15 15 | # RSE102
16    |-raise TypeError ()
   16 |+raise TypeError
17 17 | 
18 18 | # RSE102
19 19 | raise TypeError \

RSE102.py:20:5: RSE102 [*] Unnecessary parentheses on raised exception
   |
20 | # RSE102
21 | raise TypeError \
22 |     ()
   |     ^^ RSE102
23 | 
24 | # RSE102
   |
   = help: Remove unnecessary parentheses

ℹ Suggested fix
16 16 | raise TypeError ()
17 17 | 
18 18 | # RSE102
19    |-raise TypeError \
20    |-    ()
   19 |+raise TypeError
21 20 | 
22 21 | # RSE102
23 22 | raise TypeError(

RSE102.py:23:16: RSE102 [*] Unnecessary parentheses on raised exception
   |
23 |   # RSE102
24 |   raise TypeError(
   |  ________________^
25 | | 
26 | | )
   | |_^ RSE102
27 |   
28 |   # RSE102
   |
   = help: Remove unnecessary parentheses

ℹ Suggested fix
20 20 |     ()
21 21 | 
22 22 | # RSE102
23    |-raise TypeError(
24    |-
25    |-)
   23 |+raise TypeError
26 24 | 
27 25 | # RSE102
28 26 | raise TypeError(

RSE102.py:28:16: RSE102 [*] Unnecessary parentheses on raised exception
   |
28 |   # RSE102
29 |   raise TypeError(
   |  ________________^
30 | |     # Hello, world!
31 | | )
   | |_^ RSE102
32 |   
33 |   raise AssertionError
   |
   = help: Remove unnecessary parentheses

ℹ Suggested fix
25 25 | )
26 26 | 
27 27 | # RSE102
28    |-raise TypeError(
29    |-    # Hello, world!
30    |-)
   28 |+raise TypeError
31 29 | 
32 30 | raise AssertionError
33 31 | 


