diff --git a/mypy/plugins/attrs.py b/mypy/plugins/attrs.py index 425eeb77600e..39b0baa83c01 100644 --- a/mypy/plugins/attrs.py +++ b/mypy/plugins/attrs.py @@ -190,7 +190,6 @@ def _determine_eq_order(ctx: 'mypy.plugin.ClassDefContext') -> Tuple[bool, bool] # cmp takes precedence due to bw-compatibility. if cmp is not None: - ctx.api.fail("cmp is deprecated, use eq and order", ctx.reason) return cmp, cmp # If left None, equality is on and ordering mirrors equality. diff --git a/test-data/unit/check-attr.test b/test-data/unit/check-attr.test index de7b4f9c59d1..2175af5e39ab 100644 --- a/test-data/unit/check-attr.test +++ b/test-data/unit/check-attr.test @@ -278,15 +278,15 @@ A(1) != 1 [case testAttrsCmpEqOrderValues] from attr import attrib, attrs -@attrs(cmp=True) # E: cmp is deprecated, use eq and order +@attrs(cmp=True) class DeprecatedTrue: ... -@attrs(cmp=False) # E: cmp is deprecated, use eq and order +@attrs(cmp=False) class DeprecatedFalse: ... -@attrs(cmp=False, eq=True) # E: Don't mix `cmp` with `eq' and `order` # E: cmp is deprecated, use eq and order +@attrs(cmp=False, eq=True) # E: Don't mix `cmp` with `eq' and `order` class Mixed: ...