remove unnecessary changes

This commit is contained in:
Dinesh Yeduguru 2024-12-05 18:04:02 -08:00
parent 04e6998d6f
commit 6e476a0575

View file

@ -345,6 +345,7 @@ def check_protocol_compliance(obj: Any, protocol: Any) -> None:
) )
missing_methods.append((name, "signature_mismatch")) missing_methods.append((name, "signature_mismatch"))
else: else:
# Check if the method is actually implemented in the class
method_owner = next( method_owner = next(
(cls for cls in mro if name in cls.__dict__), None (cls for cls in mro if name in cls.__dict__), None
) )
@ -352,7 +353,6 @@ def check_protocol_compliance(obj: Any, protocol: Any) -> None:
method_owner is None method_owner is None
or method_owner.__name__ == protocol.__name__ or method_owner.__name__ == protocol.__name__
): ):
print(mro)
missing_methods.append((name, "not_actually_implemented")) missing_methods.append((name, "not_actually_implemented"))
if missing_methods: if missing_methods: