-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Comparing changes
Open a pull request
base repository: astral-sh/ruff
base: v0.0.288
head repository: astral-sh/ruff
compare: v0.0.289
- 19 commits
- 106 files changed
- 7 contributors
Commits on Sep 11, 2023
-
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 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6566d00 - Browse repository at this point
Copy the full SHA 6566d00View commit details -
Use
pages deploy
instead of the deprecatedpages publish
command ……to deploy the docs website (#7277) See cloudflare/workers-sdk#3067 Related #7276
Configuration menu - View commit details
-
Copy full SHA for ff0feb1 - Browse repository at this point
Copy the full SHA ff0feb1View commit details -
Use snapshots for remaining lexer tests (#7264)
## Summary This PR updates the remaining lexer test cases to use the snapshots. This is mainly a mechanical refactor. ## Motivation The main motivation is so that when we add the token range values to the test case output, it's easier to update the test cases. The reason they were not using the snapshots before was because of the usage of `test_case` macro. The macros is mainly used for different EOL test cases. If we just generate the snapshots directly, then the snapshot name would be suffixed with `-1`, `-2`, etc. as the test function is still the same. So, we'll create the snapshot ourselves with the platform name for the respective EOL test cases. ## Test Plan `cargo test`
Configuration menu - View commit details
-
Copy full SHA for f5701fc - Browse repository at this point
Copy the full SHA f5701fcView commit details -
Update the
docs
workflow to allow publishing a specific ref (#7278)Related #7276 Our docs publishing action does not allow targetting a specific commit when run manually which means we cannot update the documentation to anything but the latest commit on `main`. This change allows a ref to be provided. --------- Co-authored-by: Dhruv Manilawala <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 773ba5f - Browse repository at this point
Copy the full SHA 773ba5fView commit details -
Enable preview mode during benchmarks (#7208)
Split out of #7195 so benchmark changes from enabling additional rules can be reviewed separately.
Configuration menu - View commit details
-
Copy full SHA for 24b848a - Browse repository at this point
Copy the full SHA 24b848aView commit details -
Add range to lexer test snapshots (#7265)
## Summary This PR updates the lexer test snapshots to include the range value as well. This is mainly a mechanical refactor. ### Motivation The main motivation is so that we can verify that the ranges are valid and do not overlap. ## Test Plan `cargo test`
Configuration menu - View commit details
-
Copy full SHA for a41bb27 - Browse repository at this point
Copy the full SHA a41bb27View commit details -
Configuration menu - View commit details
-
Copy full SHA for 874db4f - Browse repository at this point
Copy the full SHA 874db4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40c9369 - Browse repository at this point
Copy the full SHA 40c9369View commit details -
Update preview and fix documentation symbols (#7207)
I don't love the sunrise emoji and 🧪 seems nice :) Requires #7195 --------- Co-authored-by: konsti <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 73ad2af - Browse repository at this point
Copy the full SHA 73ad2afView commit details -
Display the
--preview
option in the CLI help menu (#7274)If we're going to warn on use of NURSERY in #7210 we probably ought to show the `--preview` option in our help menus.
Configuration menu - View commit details
-
Copy full SHA for c21b960 - Browse repository at this point
Copy the full SHA c21b960View commit details
Commits on Sep 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1e6df19 - Browse repository at this point
Copy the full SHA 1e6df19View commit details -
Fix panic when formatting binary expression with two implicit concate…
…nated string operands (#7287)
Configuration menu - View commit details
-
Copy full SHA for 08f1922 - Browse repository at this point
Copy the full SHA 08f1922View commit details -
Ignore
@override
method when enforcingbad-dunder-name
rule (#7224)## Summary Closes #6958. If a method has the `override` decorator, there is nothing you can do about incorrect dunder methods, so they should be ignored. ## Test Plan Overridden incorrect dunder method was added to the tests to verify ruff doesn't catch it when evaluating the file. Snapshot changes are all just line number changes
Configuration menu - View commit details
-
Copy full SHA for b4419c3 - Browse repository at this point
Copy the full SHA b4419c3View commit details -
Add documentation to
duplicate-union-member
(#7225)## Summary Add documentation to `duplicate-union-member` (`PYI016`) rule. Related to #2646. ## Test Plan `python scripts/check_docs_formatted.py`
Configuration menu - View commit details
-
Copy full SHA for e7b7e4a - Browse repository at this point
Copy the full SHA e7b7e4aView commit details -
Add
NotebookIndex
to the cache (#6863)## Summary This PR updates the `FileCache` to include an optional `NotebookIndex` to support caching for Jupyter Notebooks. We only require the index to compute the diagnostics and thus we don't really need to store the entire `Notebook` on the `Diagnostics` struct. This means we only need the index to be stored in the cache to reconstruct the `Diagnostics`. ## Test Plan Update an existing test case to run over the fixtures under `ruff_notebook` crate where there are multiple Jupyter Notebook. Locally, the following commands were run in order: 1. Remove the cache: `rm -rf .ruff_cache` 2. Run without cache: `cargo run --bin ruff -- check --isolated crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb --no-cache` 3. Run with cache: `cargo run --bin ruff -- check --isolated crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb` 4. Check whether the `.ruff_cache` directory was created or not 5. Run with cache again and verify: `cargo run --bin ruff -- check --isolated crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb` ## Benchmarks #6863 (comment) fixes: #6671
Configuration menu - View commit details
-
Copy full SHA for ee0f127 - Browse repository at this point
Copy the full SHA ee0f127View commit details -
Configuration menu - View commit details
-
Copy full SHA for e561f57 - Browse repository at this point
Copy the full SHA e561f57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d4dd3e - Browse repository at this point
Copy the full SHA 5d4dd3eView commit details -
Add preview documentation section (#7281)
Adds a basic documentation section for preview mode based on the FAQ entry and versioning RFC.
Configuration menu - View commit details
-
Copy full SHA for 008da95 - Browse repository at this point
Copy the full SHA 008da95View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7a2779 - Browse repository at this point
Copy the full SHA e7a2779View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.0.288...v0.0.289