-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v0.2.0 #9680
Release v0.2.0 #9680
Commits on Feb 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c072707 - Browse repository at this point
Copy the full SHA c072707View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5dba038 - Browse repository at this point
Copy the full SHA 5dba038View commit details -
[
flake8-pyi
] Markunaliased-collections-abc-set-import
fix as safe (#9679) ## Summary Prompted by #8482 (comment). The rename is only unsafe when the symbol is exported, so we can narrow the conditions.
Configuration menu - View commit details
-
Copy full SHA for 0b800a9 - Browse repository at this point
Copy the full SHA 0b800a9View commit details -
Recategorize
static-key-dict-comprehension
fromRUF011
toB035
(#……9428) ## Summary This rule was added to flake8-bugbear. In general, we tend to prefer redirecting to prominent plugins when our own rules are reimplemented (since more projects have `B` activated than `RUF`). ## Test Plan `cargo test` # Conflicts: # crates/ruff_linter/src/rules/ruff/rules/mod.rs
Configuration menu - View commit details
-
Copy full SHA for e210c3c - Browse repository at this point
Copy the full SHA e210c3cView commit details -
Remove preview gating for newly-added stable fixes (#9681)
## Summary At present, our versioning policy forbids the addition of safe fixes to stable rules outside of a minor release, so we've accumulated a bunch of new fixes that are behind `--preview`, and can be ungated in v0.2.0. To find these, I just grepped for `preview.is_enabled()` and identified all such cases. I then audited the `preview_rules` test fixtures and removed any tests that existed only to test this autofix behavior. # Conflicts: # crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__SIM114_SIM114.py.snap # crates/ruff_linter/src/rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__preview__SIM114_SIM114.py.snap
Configuration menu - View commit details
-
Copy full SHA for d81a76d - Browse repository at this point
Copy the full SHA d81a76dView commit details -
Remove preview gating for
pycodestyle
rules (#9685)## Summary Un-gates the behavior to allow `sys.path` modifications between imports, which removed a bunch of false positives in the ecosystem CI at the time.
Configuration menu - View commit details
-
Copy full SHA for e201f45 - Browse repository at this point
Copy the full SHA e201f45View commit details -
Remove preview gating for
flake8-pie
rules (#9684)## Summary Both of the preview behaviors gated here seem like improvements, so let's make them stable in v0.2.0
Configuration menu - View commit details
-
Copy full SHA for 2b6e093 - Browse repository at this point
Copy the full SHA 2b6e093View commit details -
Remove preview gating for
flake8-simplify
rules (#9686)## Summary Un-gates detecting `dict.get` rewrites in `if` expressions (rather than just `if` statements).
Configuration menu - View commit details
-
Copy full SHA for 60dd138 - Browse repository at this point
Copy the full SHA 60dd138View commit details -
Replace
--show-source
and--no-show-source
with `--output_format=……<full|concise>` (#9687) Fixes #7350 ## Summary * `--show-source` and `--no-show-source` are now deprecated. * `output-format` supports two new variants, `full` and `concise`. `text` is now a deprecated variant, and any use of it is treated as the default serialization format. * `--output-format` now default to `concise` * In preview mode, `--output-format` defaults to `full` * `--show-source` will still set `--output-format` to `full` if the output format is not otherwise specified. * likewise, `--no-show-source` can override an output format that was set in a file-based configuration, though it will also be overridden by `--output-format` ## Test Plan A lot of tests were updated to use `--output-format=full`. Additional tests were added to ensure the correct deprecation warnings appeared, and that deprecated options behaved as intended. # Conflicts: # crates/ruff/tests/integration_test.rs
Configuration menu - View commit details
-
Copy full SHA for 0001350 - Browse repository at this point
Copy the full SHA 0001350View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c644d5 - Browse repository at this point
Copy the full SHA 7c644d5View commit details -
Always request the concise output format during ecosystem checks (#9708)
Fixes a regression in the ecosystem checks from #9687 which was causing them to run for multiple hours due to the size of the output. We need the concise format for comparisons. We should probably update the ecosystem checks to actually diff the full output in the future because that'd be nice. # Conflicts: # python/ruff-ecosystem/ruff_ecosystem/projects.py
Configuration menu - View commit details
-
Copy full SHA for 7574b57 - Browse repository at this point
Copy the full SHA 7574b57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b9132b - Browse repository at this point
Copy the full SHA 5b9132bView commit details -
Add rule deprecation infrastructure (#9689)
Adds a new `Deprecated` rule group in addition to `Stable` and `Preview`. Deprecated rules: - Warn on explicit selection without preview - Error on explicit selection with preview - Are excluded when selected by prefix with preview Deprecates `TRY200`, `ANN101`, and `ANN102` as a proof of concept. We can consider deprecating them separately.
Configuration menu - View commit details
-
Copy full SHA for 542d5f1 - Browse repository at this point
Copy the full SHA 542d5f1View commit details -
Add rule removal infrastructure (#9691)
Similar to #9689 — retains removed rules for better error messages and documentation but removed rules _cannot_ be used in any context. Removes PLR1706 as a useful test case and something we want to accomplish in #9680 anyway. The rule was in preview so we do not need to deprecate it first. Closes #9007 ## Test plan <img width="1110" alt="Rules table" src="https://github.com/astral-sh/ruff/assets/2586601/ac9fa682-623c-44aa-8e51-d8ab0d308355"> <img width="1110" alt="Rule page" src="https://github.com/astral-sh/ruff/assets/2586601/05850b2d-7ca5-49bb-8df8-bb931bab25cd">
Configuration menu - View commit details
-
Copy full SHA for 8620c6a - Browse repository at this point
Copy the full SHA 8620c6aView commit details -
Stabilize some rules for v0.2.0 release (#9712)
## Summary This PR stabilizes the preview rules from: - `flake8-trio` (6 rules) - `flake8-quotes` (1 rule) - `pyupgrade` (1 rule) - `flake8-pyi` (1 rule) - `flake8-simplify` (2 rules) - `flake8-bandit` (9 rules; 14 remain in preview) - `flake8-type-checking` (1 rule) - `numpy` (1 rule) - `ruff` (4 rules, one elevated from nursery; 6 remain in preview as they were added within the last 30 days) - `flake8-logging` (4 rules) I see these are largely uncontroversial.
Configuration menu - View commit details
-
Copy full SHA for c1e6732 - Browse repository at this point
Copy the full SHA c1e6732View commit details -
Recategorize
runtime-string-union
toTCH010
(#9721)## Summary This rule was added to `flake8-type-checking` as `TC010`. We're about to stabilize it, so we might as well use the correct code. See: #9573.
Configuration menu - View commit details
-
Copy full SHA for 28672fe - Browse repository at this point
Copy the full SHA 28672feView commit details -
Fix bug where selection included deprecated rules during preview (#9746)
Cherry-picked from #9714 which is being abandoned for now because we need to invest more into our redirection infrastructure before it is feasible. Fixes a bug in the implementation where we improperly included deprecated rules in `RuleSelector.rules()` when preview is on. Includes some clean-up of error messages and the implementation. # Conflicts: # crates/ruff/tests/integration_test.rs
Configuration menu - View commit details
-
Copy full SHA for 1fb6ea6 - Browse repository at this point
Copy the full SHA 1fb6ea6View commit details -
Configuration menu - View commit details
-
Copy full SHA for dcc69f2 - Browse repository at this point
Copy the full SHA dcc69f2View commit details -
Add tests for redirected rules (#9754)
Extends #9752 adding internal test rules for redirection Fixes a bug where we did not see warnings for exact codes that are redirected (just prefixes)
Configuration menu - View commit details
-
Copy full SHA for 003a360 - Browse repository at this point
Copy the full SHA 003a360View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6812ee - Browse repository at this point
Copy the full SHA f6812eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c18fc7 - Browse repository at this point
Copy the full SHA 8c18fc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 386035f - Browse repository at this point
Copy the full SHA 386035fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6769cee - Browse repository at this point
Copy the full SHA 6769ceeView commit details