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:
SimpleArt
2021-07-07 21:20:26 -04:00
parent 9ee9c75db6
commit 33ac462522

View File

@ -205,9 +205,7 @@ class AsMethod:
return vars(obj)[self.name] return vars(obj)[self.name]
def __set__(self: AsMethod, obj: "AttributesProperties", method: Callable) -> None: def __set__(self: AsMethod, obj: "AttributesProperties", method: Callable) -> None:
if method is None: if not callable(method):
pass
elif not callable(method):
raise TypeError(f"{self.name} must be a method i.e. callable.") raise TypeError(f"{self.name} must be a method i.e. callable.")
elif next(iter(signature(method).parameters), None) in ("self", "ga"): elif next(iter(signature(method).parameters), None) in ("self", "ga"):
method = MethodType(method, obj) method = MethodType(method, obj)