From 0e8e82a7a0dc2e4e2786e7e683daa763aac72ade Mon Sep 17 00:00:00 2001 From: Tim Stumbaugh Date: Fri, 4 Oct 2024 01:12:03 -0400 Subject: [PATCH] Remove mention of cmp= from next gen docs (#1355) `attrs.define` and `attrs.field` do not actually accept `cmp=` anymore, but the docs still discuss them --- src/attr/_next_gen.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/attr/_next_gen.py b/src/attr/_next_gen.py index 169799a8..e36b6d75 100644 --- a/src/attr/_next_gen.py +++ b/src/attr/_next_gen.py @@ -76,7 +76,7 @@ def define( sensible ``__ne__`` by default, so it *should* be enough to only implement ``__eq__`` in most cases). - Passing True or False` to *init*, *repr*, *eq*, *cmp*, or *hash* + Passing True or False` to *init*, *repr*, *eq*, or *hash* overrides whatever *auto_detect* would determine. auto_exc (bool): @@ -151,10 +151,6 @@ def define( .. seealso:: `comparison` - cmp (bool | None): - Setting *cmp* is equivalent to setting *eq* and *order* to the same - value. Must not be mixed with *eq* or *order*. - unsafe_hash (bool | None): If None (default), the ``__hash__`` method is generated according how *eq* and *frozen* are set. @@ -504,12 +500,6 @@ def field( .. seealso:: `comparison` - cmp(bool | ~typing.Callable): - Setting *cmp* is equivalent to setting *eq* and *order* to the same - value. Must not be mixed with *eq* or *order*. - - .. seealso:: `comparison` - hash (bool | None): Include this attribute in the generated ``__hash__`` method. If None (default), mirror *eq*'s value. This is the correct behavior