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]
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user