From e7684d349311f004b2ddcbe096f8e4e2ba22c18a Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Thu, 3 Apr 2025 21:27:11 +0200 Subject: [PATCH] Enable overindented docs lint (#17182) ## Summary It turns out that `a.` isn't a list format supported by rustdoc. I changed the documentation to use `1.`, `2.` instead. ## Test Plan `cargo clippy` --- Cargo.toml | 6 +----- crates/red_knot_python_semantic/src/symbol.rs | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 01fb197339..3d535371fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,7 +124,7 @@ rayon = { version = "1.10.0" } regex = { version = "1.10.2" } rustc-hash = { version = "2.0.0" } # When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml` -salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "296a8c78da1b54c76ff5795eb4c1e3fe2467e9fc"} +salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "296a8c78da1b54c76ff5795eb4c1e3fe2467e9fc" } schemars = { version = "0.8.16" } seahash = { version = "4.1.0" } serde = { version = "1.0.197", features = ["derive"] } @@ -228,10 +228,6 @@ redundant_clone = "warn" debug_assert_with_mut_call = "warn" unused_peekable = "warn" -# Has false positives -# https://github.com/rust-lang/rust-clippy/issues/14275 -doc_overindented_list_items = "allow" - # Diagnostics are not actionable: Enable once https://github.com/rust-lang/rust-clippy/issues/13774 is resolved. large_stack_arrays = "allow" diff --git a/crates/red_knot_python_semantic/src/symbol.rs b/crates/red_knot_python_semantic/src/symbol.rs index e6a8fd3991..08c100486e 100644 --- a/crates/red_knot_python_semantic/src/symbol.rs +++ b/crates/red_knot_python_semantic/src/symbol.rs @@ -464,11 +464,11 @@ impl<'db> SymbolAndQualifiers<'db> { /// /// 1. If `self` is definitely bound, return `self` without evaluating `fallback_fn()`. /// 2. Else, evaluate `fallback_fn()`: - /// a. If `self` is definitely unbound, return the result of `fallback_fn()`. - /// b. Else, if `fallback` is definitely unbound, return `self`. - /// c. Else, if `self` is possibly unbound and `fallback` is definitely bound, + /// 1. If `self` is definitely unbound, return the result of `fallback_fn()`. + /// 2. Else, if `fallback` is definitely unbound, return `self`. + /// 3. Else, if `self` is possibly unbound and `fallback` is definitely bound, /// return `Symbol(, Boundness::Bound)` - /// d. Else, if `self` is possibly unbound and `fallback` is possibly unbound, + /// 4. Else, if `self` is possibly unbound and `fallback` is possibly unbound, /// return `Symbol(, Boundness::PossiblyUnbound)` #[must_use] pub(crate) fn or_fall_back_to(