ruff/crates
Zanie Blue 6566d00295
Update rule selection to respect preview mode (#7195)
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

Extends work in #7046 (some relevant discussion there)

Changes:

- All nursery rules are now referred to as preview rules
- Documentation for the nursery is updated to describe preview
- Adds a "PREVIEW" selector for preview rules
- This is primarily to allow `--preview --ignore PREVIEW --extend-select
FOO001,BAR200`
- Using `--preview` enables preview rules that match selectors

Notable decisions:

- Preview rules are not selectable by their rule code without enabling
preview
- Retains the "NURSERY" selector for backwards compatibility
- Nursery rules are selectable by their rule code for backwards
compatiblity

Additional work:

- Selection of preview rules without the "--preview" flag should display
a warning
- Use of deprecated nursery selection behavior should display a warning
- Nursery selection should be removed after some time

## Test Plan

<!-- How was it tested? -->

Manual confirmation (i.e. we don't have an preview rules yet just
nursery rules so I added a preview rule for manual testing)

New unit tests

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2023-09-11 12:28:39 -05:00
..
flake8_to_ruff Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00
ruff Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00
ruff_benchmark Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00
ruff_cache Error on zero tab width (#6429) 2023-08-08 16:51:37 -04:00
ruff_cli Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00
ruff_dev Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00
ruff_diagnostics Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_formatter Split implicit concatenated strings before binary expressions (#7145) 2023-09-08 06:51:26 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00
ruff_notebook Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_python_ast Move ExprConstant::kind to StringConstant::unicode (#7180) 2023-09-06 07:39:25 +00:00
ruff_python_codegen Move ExprConstant::kind to StringConstant::unicode (#7180) 2023-09-06 07:39:25 +00:00
ruff_python_formatter Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
ruff_python_index Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_python_literal Avoid parsing other parts of a format specification if replacements are present (#6858) 2023-08-25 17:42:57 +00:00
ruff_python_parser Avoid allocating in lex_decimal (#7252) 2023-09-11 06:37:25 +00:00
ruff_python_resolver Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic Move refurb/helpers utils to ruff_python_semantic for broader use (#6990) 2023-08-29 14:45:09 -04:00
ruff_python_stdlib Use the unicode-ident crate (#7212) 2023-09-07 08:19:25 +00:00
ruff_python_trivia Use the unicode-ident crate (#7212) 2023-09-07 08:19:25 +00:00
ruff_shrinking Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_source_file Fix D204 when there's a semicolon after a docstring (#7174) 2023-09-11 15:09:47 +02:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Split implicit concatenated strings before binary expressions (#7145) 2023-09-08 06:51:26 +00:00
ruff_workspace Update rule selection to respect preview mode (#7195) 2023-09-11 12:28:39 -05:00