ruff/crates/ruff_linter
Jonathan Plasse 776eb8724f
Fix FBT001 false negative with unions and optional (#7501)
## Summary

- Close #7487

In the spirit of `flake8-boolean-trap`, any positional argument that can
accept a boolean should raise `FBT001`.
Raise `FBT001` for all annotations that accept booleans (e.g.
`Optional[bool]`, `Union[int, bool]`).

## Test Plan

Add a fixture, with an annotation using `|`, `Optional`, and `Union`,
and containing a boolean.
2023-11-12 15:09:23 -05:00
..
resources/test Fix FBT001 false negative with unions and optional (#7501) 2023-11-12 15:09:23 -05:00
src Fix FBT001 false negative with unions and optional (#7501) 2023-11-12 15:09:23 -05:00
Cargo.toml Prepare release 0.1.5 (#8570) 2023-11-08 16:00:57 -06:00