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.
This commit is contained in:
Jérémy Scanvic 2025-08-03 18:30:56 +02:00 committed by GitHub
parent bc6e105c18
commit 134435415e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ use crate::checkers::ast::Checker;
/// Checks for type annotations where `None` is not at the end of an union. /// Checks for type annotations where `None` is not at the end of an union.
/// ///
/// ## Why is this bad? /// ## 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 /// 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. /// readability, it's preferred to write the more informative type expressions first.
/// ///