Removed unnecessary code
Originally this code was meant to help incorporate the dataclass, until it was found that inheritance solved the issue.
This commit is contained in:
@ -205,9 +205,7 @@ class AsMethod:
|
||||
return vars(obj)[self.name]
|
||||
|
||||
def __set__(self: AsMethod, obj: "AttributesProperties", method: Callable) -> None:
|
||||
if method is None:
|
||||
pass
|
||||
elif not callable(method):
|
||||
if not callable(method):
|
||||
raise TypeError(f"{self.name} must be a method i.e. callable.")
|
||||
elif next(iter(signature(method).parameters), None) in ("self", "ga"):
|
||||
method = MethodType(method, obj)
|
||||
|
||||
Reference in New Issue
Block a user