From 984d90a811afc344518e64f8e8c8f300c69b8aaf Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 8 Nov 2019 00:50:32 +0200 Subject: [PATCH] Drop redundant custom MarkDecorator __eq__ implementation This is already covered by attrs. Also, the custom implementation returns False when the types don't match, but it's better to return `NotImplemented`. attrs does this. --- src/_pytest/mark/structures.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/_pytest/mark/structures.py b/src/_pytest/mark/structures.py index 2cab96d67..924d980f3 100644 --- a/src/_pytest/mark/structures.py +++ b/src/_pytest/mark/structures.py @@ -213,9 +213,6 @@ class MarkDecorator: def markname(self): return self.name # for backward-compat (2.4.1 had this attr) - def __eq__(self, other): - return self.mark == other.mark if isinstance(other, MarkDecorator) else False - def __repr__(self): return "".format(self.mark)