---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP039 [*] Unnecessary parentheses after class definition
 --> UP039.py:2:8
  |
1 | # Errors
2 | class A():
  |        ^^
3 |     pass
  |
help: Remove parentheses
  |
1 | # Errors
  - class A():
2 + class A:
3 |     pass
  |

UP039 [*] Unnecessary parentheses after class definition
 --> UP039.py:6:8
  |
6 | class A() \
  |        ^^
7 |     :
8 |     pass
  |
help: Remove parentheses
  |
5 |
  - class A() \
6 + class A \
7 |     :
  |

UP039 [*] Unnecessary parentheses after class definition
  --> UP039.py:12:9
   |
11 | class A \
12 |         ():
   |         ^^
13 |     pass
   |
help: Remove parentheses
   |
11 | class A \
   -         ():
12 +         :
13 |     pass
   |

UP039 [*] Unnecessary parentheses after class definition
  --> UP039.py:17:8
   |
16 | @decorator()
17 | class A():
   |        ^^
18 |     pass
   |
help: Remove parentheses
   |
16 | @decorator()
   - class A():
17 + class A:
18 |     pass
   |

UP039 [*] Unnecessary parentheses after class definition
  --> UP039.py:21:8
   |
20 | @decorator
21 | class A():
   |        ^^
22 |     pass
   |
help: Remove parentheses
   |
20 | @decorator
   - class A():
21 + class A:
22 |     pass
   |

UP039 [*] Unnecessary parentheses after class definition
  --> UP039.py:46:10
   |
46 |   class Foo(
   |  __________^
47 | |     # text
48 | | ): ...
   | |_^
   |
help: Remove parentheses
   |
45 |
   - class Foo(
   -     # text
   - ): ...
46 + class Foo: ...
   |
note: This is an unsafe fix and may change runtime behavior
