Enoch Kan
5bc9d6d3aa
Rename rules currently not conforming to naming convention ( #15102 )
...
CI / Determine changes (push) Has been cancelled
CI / cargo fmt (push) Has been cancelled
CI / cargo build (release) (push) Has been cancelled
CI / python package (push) Has been cancelled
CI / pre-commit (push) Has been cancelled
CI / mkdocs (push) Has been cancelled
CI / cargo clippy (push) Has been cancelled
CI / cargo test (linux) (push) Has been cancelled
CI / cargo test (linux, release) (push) Has been cancelled
CI / cargo test (windows) (push) Has been cancelled
CI / cargo test (wasm) (push) Has been cancelled
CI / cargo build (msrv) (push) Has been cancelled
CI / cargo fuzz build (push) Has been cancelled
CI / fuzz parser (push) Has been cancelled
CI / test scripts (push) Has been cancelled
CI / ecosystem (push) Has been cancelled
CI / cargo shear (push) Has been cancelled
CI / formatter instabilities and black similarity (push) Has been cancelled
CI / test ruff-lsp (push) Has been cancelled
CI / benchmarks (push) Has been cancelled
## Summary
This pull request renames 19 rules which currently do not conform to
Ruff's [naming
convention](https://github.com/astral-sh/ruff/blob/main/CONTRIBUTING.md#rule-naming-convention ).
## Description
Fixes astral-sh/ruff#15009 .
2024-12-23 15:48:45 -06:00
Micha Reiser
97965ff114
Rename --current-directory
to --project
in Red Knot benchmark script ( #15124 )
CI / cargo build (release) (push) Waiting to run
CI / cargo shear (push) Blocked by required conditions
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
2024-12-23 12:50:35 +00:00
Micha Reiser
dcb85b7088
Update benchmark scripts, use uv ( #15120 )
2024-12-23 11:14:15 +01:00
Dhruv Manilawala
3bb0dac235
Bump version to 0.8.4 ( #15064 )
2024-12-19 13:15:42 +00:00
renovate[bot]
50739f91dc
Update dependency mdformat-mkdocs to v4 ( #15011 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[mdformat-mkdocs](https://redirect.github.com/kyleking/mdformat-mkdocs )
([changelog](https://redirect.github.com/kyleking/mdformat-mkdocs/releases ))
| `==3.1.1` -> `==4.0.0` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>kyleking/mdformat-mkdocs (mdformat-mkdocs)</summary>
###
[`v4.0.0`](https://redirect.github.com/KyleKing/mdformat-mkdocs/releases/tag/v4.0.0 )
[Compare
Source](https://redirect.github.com/kyleking/mdformat-mkdocs/compare/v3.1.1...v4.0.0 )
#### What's Changed
- fix!: add newline after title for consistency with MKDocs style by
[@​KyleKing](https://redirect.github.com/KyleKing ) in
[https://github.com/KyleKing/mdformat-mkdocs/pull/44 ](https://redirect.github.com/KyleKing/mdformat-mkdocs/pull/44 )
**Full Changelog**:
https://github.com/KyleKing/mdformat-mkdocs/compare/v3.1.1...v4.0.0
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/astral-sh/ruff ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Kyle King <KyleKing@users.noreply.github.com>
2024-12-16 22:48:37 +05:30
InSync
7173e6a20b
Use stripping block (|-
) for page descriptions ( #14980 )
...
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## Summary
Resolves #14976 .
Currently, we uses this "[plain
scalar](https://yaml.org/spec/1.2.2/#733-plain-style )" format:
```yaml
description: Checks for `if key in dictionary: del dictionary[key]`.
```
Plain scalar must not contain the sequence `: `, however, so the above
is invalid.
This PR changes that to:
```yaml
description: |-
Checks for `if key in dictionary: del dictionary[key]`.
```
`|` denotes a "[block
scalar](https://yaml.org/spec/1.2.2/#81-block-scalar-styles )", whereas
[the `-` chomping
indicator](https://yaml.org/spec/1.2.2/#8112-block-chomping-indicator )
requires that a trailing newline, if any, must be stripped.
## Test Plan

2024-12-15 17:07:29 +01:00
Dylan
37f433814c
Bump version to 0.8.3 ( #14937 )
...
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2024-12-12 14:13:06 +00:00
Dhruv Manilawala
b0e26e6fc8
Bump version to 0.8.2 ( #14789 )
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
2024-12-05 18:06:35 +05:30
Dhruv Manilawala
976c37a849
Bump version to 0.8.1 ( #14655 )
2024-11-28 19:12:50 +05:30
Micha Reiser
14ba469fc0
Use a derive macro for Violations ( #14557 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-11-27 09:41:40 +00:00
Alex Waygood
e0f3eaf1dd
Turn the fuzz-parser
script into a properly packaged Python project ( #14606 )
...
## Summary
This PR gets rid of the `requirements.in` and `requirements.txt` files
in the `scripts/fuzz-parser` directory, and replaces them with
`pyproject.toml` and `uv.lock` files. The script is renamed from
`fuzz-parser` to `py-fuzzer` (since it can now also be used to fuzz
red-knot as well as the parser, following
https://github.com/astral-sh/ruff/pull/14566 ), and moved from the
`scripts/` directory to the `python/` directory, since it's now a
(uv)-pip-installable project in its own right.
I've been resisting this for a while, because conceptually this script
just doesn't feel "complicated" enough to me for it to be a full-blown
package. However, I think it's time to do this. Making it a proper
package has several advantages:
- It means we can run it from the project root using `uv run` without
having to activate a virtual environment and ensure that all required
dependencies are installed into that environment
- Using a `pyproject.toml` file means that we can express that the
project requires Python 3.12+ to run properly; this wasn't possible
before
- I've been running mypy on the project locally when I've been working
on it or reviewing other people's PRs; now I can put the mypy config for
the project in the `pyproject.toml` file
## Test Plan
I manually tested that all the commands detailed in
`python/py-fuzzer/README.md` work for me locally.
---------
Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
2024-11-27 08:09:04 +00:00
Alex Waygood
fab1b0d546
fuzz-parser: catch exceptions from pysource-minimize
( #14586 )
2024-11-25 15:14:01 +00:00
Connor Skees
66abef433b
red-knot: adapt fuzz-parser to work with red-knot ( #14566 )
...
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-11-25 13:12:28 +00:00
Micha Reiser
8358ad8d25
Ruff 0.8 release ( #14486 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: David Salvisberg <dave@daverball.com>
2024-11-22 08:45:19 +01:00
cmp0xff
b9da4305e6
doc(B024): #14455 add annotated but unassgined class variables ( #14502 )
...
# Summary
Closes #14455 , migrated from https://github.com/astral-sh/docs/pull/106 .
2024-11-21 09:08:02 -06:00
Zanie Blue
3c52d2d1bd
Improve the performance of the formatter instability check job ( #14471 )
...
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
We should probably get rid of this entirely and subsume it's
functionality in the normal ecosystem checks? I don't think we're using
the black comparison tests anymore, but maybe someone wants it?
There are a few major parts to this:
1. Making the formatter script idempotent, so it can be run repeatedly
and is robust to changing commits
2. Reducing the overhead of the git operations, minimizing the data
transfer
3. Parallelizing all the git operations by repository
This reduces the setup time from 80s to 16s (locally).
The initial motivation for idempotency was to include the repositories
in the GitHub Actions cache. I'm not sure it's worth it yet — they're
about 1GB and would consume our limited cache space. Regardless, it
improves correctness for local invocations.
The total runtime of the job is reduced from ~4m to ~3m.
I also made some cosmetic changes to the output paths and such.
2024-11-20 08:55:10 -06:00
Micha Reiser
e9079e7d95
Remove the deprecated E999
rule code ( #14428 )
2024-11-20 13:11:51 +01:00
Dhruv Manilawala
ed7b98cf9b
Bump version to 0.7.4 ( #14358 )
2024-11-15 11:17:32 +00:00
Dhruv Manilawala
fbf140a665
Bump version to 0.7.3 ( #14197 )
2024-11-08 16:39:37 +05:30
Alex Waygood
574eb3f4bd
Upgrade locked dependencies for the fuzz-parser
script ( #14156 )
2024-11-07 15:10:17 +00:00
Harry Reeder
099f077311
[docs] Add rule short code to mkdocs tags ( #14040 )
...
## Summary
<!-- What's the purpose of the change? What does it do, and why? -->
This PR updates the metadata in the YAML frontmatter of the mkdocs
documentation to include the rule short code as a tag, so it can be
easily searched.
Ref: #13684
## Test Plan
<!-- How was it tested? -->
This has been tested locally using the documentation provided
[here](https://docs.astral.sh/ruff/contributing/#mkdocs ) for generating
docs.
This generates docs that now have the tags section:
```markdown
---
description: Checks for abstract classes without abstract methods.
tags:
- B024
---
# abstract-base-class-without-abstract-method (B024)
... trimmed
```
I've also verified that this gives the ability to get straight to the
page via search when serving mkdocs locally.
---------
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-11-01 15:50:12 +00:00
Dhruv Manilawala
ef72fd79a7
Bump version to 0.7.2 ( #14039 )
2024-11-01 19:09:07 +05:30
David Peter
085a43a262
[red-knot] knot benchmark: fix --knot-path
arg ( #13923 )
...
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz (push) Blocked by required conditions
CI / Fuzz the parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## Summary
Previously, this would fail with
```
AttributeError: 'str' object has no attribute 'is_file'
```
if I tried to use the `--knot-path` option. I wish we had a type checker
for Python*.
## Test Plan
```sh
uv run benchmark --knot-path ~/.cargo-target/release/red_knot
```
\* to be fair, this would probably require special handling for
`argparse` in the typechecker.
2024-10-25 11:43:39 +02:00
Dhruv Manilawala
337af836d3
Bump version to 0.7.1 ( #13913 )
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz (push) Blocked by required conditions
CI / Fuzz the parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
2024-10-24 20:57:07 +05:30
Alex Waygood
5e6de4e0c6
Changelog for Ruff v0.7 ( #13794 )
...
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2024-10-17 16:14:21 +00:00
Dhruv Manilawala
975be9c1c6
Bump version to 0.6.9 ( #13624 )
2024-10-04 18:51:13 +05:30
Micha Reiser
ae39ce56c0
Bump version to 0.6.8 ( #13522 )
2024-09-26 14:09:03 +02:00
Charlie Marsh
17c4690b5e
Bump version to v0.6.7 ( #13439 )
2024-09-21 13:16:36 -04:00
Charlie Marsh
d01cbf7f8f
Bump version to v0.6.6 ( #13415 )
2024-09-19 23:09:57 -04:00
Micha Reiser
4eb849aed3
Update the revisions of the formatter stability check projects ( #13380 )
2024-09-18 08:26:40 +02:00
Dhruv Manilawala
8558126df1
Bump version to 0.6.5 ( #13346 )
2024-09-13 20:12:26 +05:30
Calum Young
a98dbcee78
Add meta descriptions to rule pages ( #13234 )
...
## Summary
This PR updates the `scripts/generate_mkdocs.py` to add meta
descriptions to each rule as well as a fallback `site_description`.
I was initially planning to add this to `generate_docs.rs`; however
running `mdformat` on the rules caused the format of the additional
description to change into a state that mkdocs could not handle.
Fixes #13197
## Test Plan
- Run `python scripts/generate_mkdocs.py` to build the documentation
- Run `mkdocs serve -f mkdocs.public.yml` to serve the docs site locally
- Navigate to a rule on both the local site and the current production
site and note the addition of the description head tag. For example:
- http://127.0.0.1:8000/ruff/rules/unused-import/

- https://docs.astral.sh/ruff/rules/unused-import/

2024-09-09 10:01:59 -04:00
renovate[bot]
346dbf45b5
Update pre-commit dependencies ( #13289 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-09-09 11:11:01 +00:00
Dhruv Manilawala
65cc6ec41d
Bump version to 0.6.4 ( #13253 )
2024-09-05 21:05:15 +05:30
Alex Waygood
57289099bb
Make mypy pass on black in knot_benchmark
( #13235 )
2024-09-04 09:35:58 +00:00
Alex Waygood
50c8ee5175
Fix virtual environment details in knot_benchmark
( #13228 )
2024-09-03 14:35:45 +01:00
Micha Reiser
c2aac5f826
Enable multithreading for pyright ( #13227 )
2024-09-03 11:24:42 +00:00
Dhruv Manilawala
ee258caed7
Bump version to 0.6.3 ( #13152 )
2024-08-29 20:29:33 +05:30
Calum Young
2e75cfbfe7
Format PYI
examples in docs as .pyi
-file snippets ( #13116 )
2024-08-28 13:20:40 +01:00
Calum Young
ab3648c4c5
Format docs with ruff formatter ( #13087 )
...
## Summary
Now that Ruff provides a formatter, there is no need to rely on Black to
check that the docs are formatted correctly in
`check_docs_formatted.py`. This PR swaps out Black for the Ruff
formatter and updates inconsistencies between the two.
This PR will be a precursor to another PR
([branch](https://github.com/calumy/ruff/tree/format-pyi-in-docs )),
updating the `check_docs_formatted.py` script to check for pyi files,
fixing #11568 .
## Test Plan
- CI to check that the docs are formatted correctly using the updated
script.
2024-08-26 21:25:10 +05:30
Micha Reiser
4f6accb5c6
Add basic red knot benchmark ( #13026 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-08-23 08:22:42 +02:00
Dhruv Manilawala
02c4373a49
Bump version to 0.6.2 ( #13056 )
2024-08-22 18:59:27 +05:30
Alex Waygood
499c0bd875
Bump version to 0.6.1 ( #12937 )
...
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-08-16 17:48:06 +01:00
Dhruv Manilawala
c319414e54
Ignore blank line rules for docs formatting ( #12934 )
...
## Summary
fixes : #12933
## Test Plan
`python scripts/check_docs_formatted.py --generate-docs`
2024-08-16 15:27:36 +00:00
Micha Reiser
b9da31610a
Bump version to 0.6 ( #12894 )
2024-08-15 13:17:22 +01:00
renovate[bot]
cb364780b3
Update dependency mdformat-admon to v2.0.6 ( #12821 )
2024-08-12 01:59:14 +00:00
Dhruv Manilawala
221ea662e0
Bump version to 0.5.7 ( #12756 )
2024-08-08 20:56:15 +05:30
Alex Waygood
7ee7c68f36
Add a new script to generate builtin module names ( #12696 )
2024-08-05 21:33:36 +01:00
Dhruv Manilawala
82e69ebf23
Update broken links in the documentation ( #12677 )
...
## Summary
Running `mkdocs server -f mkdocs.insiders.yml` gave warnings about these
broken links.
## Test plan
I built the docs locally and verified that the updated links work
properly.
2024-08-05 05:35:23 +00:00
InSync
7a2c75e2fc
Replace ruff-lsp
links in README.md
with links to new documentation page ( #12618 )
...
Since `ruff-lsp` has been (semi-)deprecated for sometime, it wouldn't
make sense to mention it in the most prominent sections of the `README`.
Instead, they should point to the new <i>[Editor
Integrations](https://docs.astral.sh/ruff/editors/ )</i> documentation
page.
2024-08-04 15:31:36 +05:30