---
source: crates/ruff_linter/src/rules/flake8_pytest_style/mod.rs
---
PT028 [*] Test function parameter `a` has default argument
 --> PT028.py:3:16
  |
1 | # Errors
2 |
3 | def test_foo(a=1): ...
  |                ^
4 | def test_foo(a = 1): ...
5 | def test_foo(a = (1)): ...
  |
help: Remove default argument
  |
2 |
  - def test_foo(a=1): ...
3 + def test_foo(a): ...
4 | def test_foo(a = 1): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> PT028.py:4:18
  |
3 | def test_foo(a=1): ...
4 | def test_foo(a = 1): ...
  |                  ^
5 | def test_foo(a = (1)): ...
6 | def test_foo(a: int=1): ...
  |
help: Remove default argument
  |
3 | def test_foo(a=1): ...
  - def test_foo(a = 1): ...
4 + def test_foo(a): ...
5 | def test_foo(a = (1)): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> PT028.py:5:19
  |
3 | def test_foo(a=1): ...
4 | def test_foo(a = 1): ...
5 | def test_foo(a = (1)): ...
  |                   ^
6 | def test_foo(a: int=1): ...
7 | def test_foo(a: int = 1): ...
  |
help: Remove default argument
  |
4 | def test_foo(a = 1): ...
  - def test_foo(a = (1)): ...
5 + def test_foo(a): ...
6 | def test_foo(a: int=1): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> PT028.py:6:21
  |
4 | def test_foo(a = 1): ...
5 | def test_foo(a = (1)): ...
6 | def test_foo(a: int=1): ...
  |                     ^
7 | def test_foo(a: int = 1): ...
8 | def test_foo(a: (int) = 1): ...
  |
help: Remove default argument
  |
5 | def test_foo(a = (1)): ...
  - def test_foo(a: int=1): ...
6 + def test_foo(a: int): ...
7 | def test_foo(a: int = 1): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
 --> PT028.py:7:23
  |
5 | def test_foo(a = (1)): ...
6 | def test_foo(a: int=1): ...
7 | def test_foo(a: int = 1): ...
  |                       ^
8 | def test_foo(a: (int) = 1): ...
9 | def test_foo(a: int = (1)): ...
  |
help: Remove default argument
  |
6 | def test_foo(a: int=1): ...
  - def test_foo(a: int = 1): ...
7 + def test_foo(a: int): ...
8 | def test_foo(a: (int) = 1): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
  --> PT028.py:8:25
   |
 6 | def test_foo(a: int=1): ...
 7 | def test_foo(a: int = 1): ...
 8 | def test_foo(a: (int) = 1): ...
   |                         ^
 9 | def test_foo(a: int = (1)): ...
10 | def test_foo(a: (int) = (1)): ...
   |
help: Remove default argument
  |
7 | def test_foo(a: int = 1): ...
  - def test_foo(a: (int) = 1): ...
8 + def test_foo(a: (int)): ...
9 | def test_foo(a: int = (1)): ...
  |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
  --> PT028.py:9:24
   |
 7 | def test_foo(a: int = 1): ...
 8 | def test_foo(a: (int) = 1): ...
 9 | def test_foo(a: int = (1)): ...
   |                        ^
10 | def test_foo(a: (int) = (1)): ...
11 | def test_foo(a=1, /, b=2, *, c=3): ...
   |
help: Remove default argument
   |
8  | def test_foo(a: (int) = 1): ...
   - def test_foo(a: int = (1)): ...
9  + def test_foo(a: int): ...
10 | def test_foo(a: (int) = (1)): ...
   |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
  --> PT028.py:10:26
   |
 8 | def test_foo(a: (int) = 1): ...
 9 | def test_foo(a: int = (1)): ...
10 | def test_foo(a: (int) = (1)): ...
   |                          ^
11 | def test_foo(a=1, /, b=2, *, c=3): ...
   |
help: Remove default argument
   |
9  | def test_foo(a: int = (1)): ...
   - def test_foo(a: (int) = (1)): ...
10 + def test_foo(a: (int)): ...
11 | def test_foo(a=1, /, b=2, *, c=3): ...
   |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `a` has default argument
  --> PT028.py:11:16
   |
 9 | def test_foo(a: int = (1)): ...
10 | def test_foo(a: (int) = (1)): ...
11 | def test_foo(a=1, /, b=2, *, c=3): ...
   |                ^
   |
help: Remove default argument
   |
10 | def test_foo(a: (int) = (1)): ...
   - def test_foo(a=1, /, b=2, *, c=3): ...
11 + def test_foo(a, /, b=2, *, c=3): ...
12 |
   |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `b` has default argument
  --> PT028.py:11:24
   |
 9 | def test_foo(a: int = (1)): ...
10 | def test_foo(a: (int) = (1)): ...
11 | def test_foo(a=1, /, b=2, *, c=3): ...
   |                        ^
   |
help: Remove default argument
   |
10 | def test_foo(a: (int) = (1)): ...
   - def test_foo(a=1, /, b=2, *, c=3): ...
11 + def test_foo(a=1, /, b, *, c=3): ...
12 |
   |
note: This is a display-only fix and is likely to be incorrect

PT028 [*] Test function parameter `c` has default argument
  --> PT028.py:11:32
   |
 9 | def test_foo(a: int = (1)): ...
10 | def test_foo(a: (int) = (1)): ...
11 | def test_foo(a=1, /, b=2, *, c=3): ...
   |                                ^
   |
help: Remove default argument
   |
10 | def test_foo(a: (int) = (1)): ...
   - def test_foo(a=1, /, b=2, *, c=3): ...
11 + def test_foo(a=1, /, b=2, *, c): ...
12 |
   |
note: This is a display-only fix and is likely to be incorrect
