From 33ac4625220dfd461f2fa5327040ac78b973f025 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Wed, 7 Jul 2021 21:20:26 -0400 Subject: [PATCH] Removed unnecessary code Originally this code was meant to help incorporate the dataclass, until it was found that inheritance solved the issue. --- EasyGA/attributes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EasyGA/attributes.py b/EasyGA/attributes.py index 5f44e06..a88438e 100644 --- a/EasyGA/attributes.py +++ b/EasyGA/attributes.py @@ -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)