mirror of
https://github.com/astral-sh/ruff.git
synced 2026-10-28 10:45:37 +08:00
Summary -- This updates `ruff_unicode_names2` and `ruff_unicode_names2_generator` to use our workspace `rand` dependency and `rust-version`, prompted by #29257 and #29359. Bumping the Rust version also introduces a handful of Clippy diagnostic that Clippy was also able to fix automatically. I originally pinned both of these to stay closer to the upstream version, but we've already diverged a bit, and the required changes were quite small anyway, so this seems like the better way to go. This also allows us to drop the `std` feature on `rand`, a transitive dependency on `zerocopy`, and the accompanying allowlist entry for its build script. While I was here, I also switched to our workspace edition, removed unused feature-gated code and unnecessary suppressions, enabled formatting and typo checks, and enabled doctests. These are the changes from `rand` for reference: - https://rust-random.github.io/book/update-0.10.html - https://rust-random.github.io/book/update-0.9.html Test Plan -- Existing tests --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
44 lines
1.4 KiB
TOML
44 lines
1.4 KiB
TOML
[files]
|
|
# https://github.com/crate-ci/typos/issues/868
|
|
extend-exclude = [
|
|
"crates/ty_vendored/vendor/**/*",
|
|
"crates/ruff_unicode_names2/data/NameAliases.txt",
|
|
"crates/ruff_unicode_names2/data/UnicodeData.txt",
|
|
"**/resources/**/*",
|
|
"**/snapshots/**/*",
|
|
"crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/collection_literal.rs",
|
|
# Completion tests tend to have a lot of incomplete
|
|
# words naturally. It's annoying to have to make all
|
|
# of them actually words. So just ignore typos here.
|
|
"crates/ty_ide/src/completion.rs",
|
|
# Same for "Did you mean...?" levenshtein tests.
|
|
"crates/ty_python_semantic/src/diagnostic/levenshtein.rs",
|
|
]
|
|
|
|
[default.extend-words]
|
|
"arange" = "arange" # e.g. `numpy.arange`
|
|
hel = "hel"
|
|
whos = "whos"
|
|
spawnve = "spawnve"
|
|
ned = "ned"
|
|
pn = "pn" # `import panel as pn` is a thing
|
|
poit = "poit"
|
|
BA = "BA" # acronym for "Bad Allowed", used in testing.
|
|
jod = "jod" # e.g., `jod-thread`
|
|
CPY = "CPY" # it's a Ruff rule category
|
|
|
|
[default]
|
|
extend-ignore-re = [
|
|
# Line ignore with trailing "spellchecker:disable-line"
|
|
"(?Rm)^.*#\\s*spellchecker:disable-line$",
|
|
"LICENSEs",
|
|
# Various third party dependencies uses `typ` as struct field names (e.g., lsp_types::LogMessageParams)
|
|
"typ",
|
|
# TODO: Remove this once the `TYP` redirects are removed from `rule_redirects.rs`
|
|
"TYP",
|
|
"ntBre"
|
|
]
|
|
|
|
[default.extend-identifiers]
|
|
"FrIeNdLy" = "FrIeNdLy"
|