From df74e5c532e5cc3f8d00adb65b3578f0ba5db7ee Mon Sep 17 00:00:00 2001 From: Yuval Shimon Date: Sun, 12 Dec 2021 14:53:29 +0200 Subject: [PATCH] fixing pre-commit --- src/_pytest/assertion/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index 618a93eca..860002f4d 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -140,7 +140,8 @@ def has_default_eq( ) -> bool: """Check if an instance of an object contains the default eq - First, we check if the object's __eq__ attribute has __code__, if so, we check the equally of the method code filename (__code__.co_filename) + First, we check if the object's __eq__ attribute has __code__, + if so, we check the equally of the method code filename (__code__.co_filename) to the default onces generated by the dataclass and attr module for dataclasses the default co_filename is , for attrs class, the __eq__ should contain "attrs eq generated" """