---
source: crates/ruff_linter/src/rules/flake8_boolean_trap/mod.rs
---
FBT001 Boolean-typed positional argument in function definition
 --> FBT.py:4:5
  |
2 |     posonly_nohint,
3 |     posonly_nonboolhint: int,
4 |     posonly_boolhint: bool,
  |     ^^^^^^^^^^^^^^^^
5 |     posonly_boolstrhint: "bool",
6 |     /,
  |

FBT001 Boolean-typed positional argument in function definition
 --> FBT.py:5:5
  |
3 |     posonly_nonboolhint: int,
4 |     posonly_boolhint: bool,
5 |     posonly_boolstrhint: "bool",
  |     ^^^^^^^^^^^^^^^^^^^
6 |     /,
7 |     offset,
  |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:10:5
   |
 8 |     posorkw_nonvalued_nohint,
 9 |     posorkw_nonvalued_nonboolhint: int,
10 |     posorkw_nonvalued_boolhint: bool,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |     posorkw_nonvalued_boolstrhint: "bool",
12 |     posorkw_boolvalued_nohint=True,
   |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:11:5
   |
 9 |     posorkw_nonvalued_nonboolhint: int,
10 |     posorkw_nonvalued_boolhint: bool,
11 |     posorkw_nonvalued_boolstrhint: "bool",
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |     posorkw_boolvalued_nohint=True,
13 |     posorkw_boolvalued_nonboolhint: int = True,
   |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:14:5
   |
12 |     posorkw_boolvalued_nohint=True,
13 |     posorkw_boolvalued_nonboolhint: int = True,
14 |     posorkw_boolvalued_boolhint: bool = True,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 |     posorkw_boolvalued_boolstrhint: "bool" = True,
16 |     posorkw_nonboolvalued_nohint=1,
   |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:15:5
   |
13 |     posorkw_boolvalued_nonboolhint: int = True,
14 |     posorkw_boolvalued_boolhint: bool = True,
15 |     posorkw_boolvalued_boolstrhint: "bool" = True,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 |     posorkw_nonboolvalued_nohint=1,
17 |     posorkw_nonboolvalued_nonboolhint: int = 2,
   |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:18:5
   |
16 |     posorkw_nonboolvalued_nohint=1,
17 |     posorkw_nonboolvalued_nonboolhint: int = 2,
18 |     posorkw_nonboolvalued_boolhint: bool = 3,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |     posorkw_nonboolvalued_boolstrhint: "bool" = 4,
20 |     *,
   |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:19:5
   |
17 |     posorkw_nonboolvalued_nonboolhint: int = 2,
18 |     posorkw_nonboolvalued_boolhint: bool = 3,
19 |     posorkw_nonboolvalued_boolstrhint: "bool" = 4,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     *,
21 |     kwonly_nonvalued_nohint,
   |

FBT001 Boolean-typed positional argument in function definition
  --> FBT.py:93:19
   |
92 |     # FBT001: Boolean positional arg in function definition
93 |     def foo(self, value: bool) -> None:
   |                   ^^^^^
94 |         pass
   |
help: Consider adding `@typing.override` if changing the function signature would violate the Liskov Substitution Principle

FBT001 Boolean-typed positional argument in function definition
   --> FBT.py:103:10
    |
103 | def func(x: Union[list, Optional[int | str | float | bool]]):
    |          ^
104 |     pass
    |

FBT001 Boolean-typed positional argument in function definition
   --> FBT.py:107:10
    |
107 | def func(x: bool | str):
    |          ^
108 |     pass
    |
