From 134435415e7bd62b703bbe5db05015526ed74909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Scanvic?= <95454914+jscanvic@users.noreply.github.com> Date: Sun, 3 Aug 2025 18:30:56 +0200 Subject: [PATCH] Change 'associative' to 'commutative' in docs describing union (#19706) Thanks for the great tool! I noticed a small typo [in the docs](https://docs.astral.sh/ruff/rules/none-not-at-end-of-union/): it's [commutativity](Commutative_property) that makes the order not matter in type unions, not [associativity](https://en.wikipedia.org/wiki/Associative_property) which is something different. I make the change in this PR. --- .../src/rules/ruff/rules/none_not_at_end_of_union.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff_linter/src/rules/ruff/rules/none_not_at_end_of_union.rs b/crates/ruff_linter/src/rules/ruff/rules/none_not_at_end_of_union.rs index a040bc9618..d69c9cd567 100644 --- a/crates/ruff_linter/src/rules/ruff/rules/none_not_at_end_of_union.rs +++ b/crates/ruff_linter/src/rules/ruff/rules/none_not_at_end_of_union.rs @@ -11,7 +11,7 @@ use crate::checkers::ast::Checker; /// Checks for type annotations where `None` is not at the end of an union. /// /// ## Why is this bad? -/// Type annotation unions are associative, meaning that the order of the elements +/// Type annotation unions are commutative, meaning that the order of the elements /// does not matter. The `None` literal represents the absence of a value. For /// readability, it's preferred to write the more informative type expressions first. ///