---
source: crates/ruff_linter/src/rules/flake8_pytest_style/mod.rs
---
PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:14:1
   |
14 | @pytest.fixture()
   | ^^^^^^^^^^^^^^^^^
15 | def parentheses_no_params():
16 |     return 42
   |
help: Remove parentheses
   |
13 |
   - @pytest.fixture()
14 + @pytest.fixture
15 | def parentheses_no_params():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:24:1
   |
24 | / @pytest.fixture(
25 | |
26 | | )
   | |_^
27 |   def parentheses_no_params_multiline():
28 |       return 42
   |
help: Remove parentheses
   |
23 |
   - @pytest.fixture(
   -
   - )
24 + @pytest.fixture
25 | def parentheses_no_params_multiline():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:39:1
   |
39 | @fixture()
   | ^^^^^^^^^^
40 | def imported_from_parentheses_no_params():
41 |     return 42
   |
help: Remove parentheses
   |
38 |
   - @fixture()
39 + @fixture
40 | def imported_from_parentheses_no_params():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:49:1
   |
49 | / @fixture(
50 | |
51 | | )
   | |_^
52 |   def imported_from_parentheses_no_params_multiline():
53 |       return 42
   |
help: Remove parentheses
   |
48 |
   - @fixture(
   -
   - )
49 + @fixture
50 | def imported_from_parentheses_no_params_multiline():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:64:1
   |
64 | @aliased()
   | ^^^^^^^^^^
65 | def aliased_parentheses_no_params():
66 |     return 42
   |
help: Remove parentheses
   |
63 |
   - @aliased()
64 + @aliased
65 | def aliased_parentheses_no_params():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:74:1
   |
74 | / @aliased(
75 | |
76 | | )
   | |_^
77 |   def aliased_parentheses_no_params_multiline():
78 |       return 42
   |
help: Remove parentheses
   |
73 |
   - @aliased(
   -
   - )
74 + @aliased
75 | def aliased_parentheses_no_params_multiline():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:81:1
   |
80 |   # https://github.com/astral-sh/ruff/issues/18770
81 | / @pytest.fixture(
82 | |     # TODO: use module scope
83 | |     # scope="module"
84 | | )
   | |_^
85 |   def my_fixture(): ...
   |
help: Remove parentheses
   |
80 | # https://github.com/astral-sh/ruff/issues/18770
   - @pytest.fixture(
   -     # TODO: use module scope
   -     # scope="module"
   - )
81 + @pytest.fixture
82 | def my_fixture(): ...
   |
note: This is an unsafe fix and may change runtime behavior

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:88:1
   |
88 | @(pytest.fixture())
   | ^^^^^^^^^^^^^^^^^^^
89 | def outer_paren_fixture_no_params():
90 |     return 42
   |
help: Remove parentheses
   |
87 |
   - @(pytest.fixture())
88 + @(pytest.fixture)
89 | def outer_paren_fixture_no_params():
   |

PT001 [*] Use `@pytest.fixture` over `@pytest.fixture()`
  --> PT001.py:93:1
   |
93 | @(fixture())
   | ^^^^^^^^^^^^
94 | def outer_paren_imported_fixture_no_params():
95 |     return 42
   |
help: Remove parentheses
   |
92 |
   - @(fixture())
93 + @(fixture)
94 | def outer_paren_imported_fixture_no_params():
   |
