From ac8a62de409e54ea038cd74746fa5bd664f6716a Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 20 Mar 2023 04:07:34 +0300 Subject: [PATCH] Update enum.py --- src/python3_anticaptcha/core/enum.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/python3_anticaptcha/core/enum.py b/src/python3_anticaptcha/core/enum.py index 733b112..1a05cde 100644 --- a/src/python3_anticaptcha/core/enum.py +++ b/src/python3_anticaptcha/core/enum.py @@ -1,9 +1,12 @@ from enum import Enum -from types import DynamicClassAttribute from typing import List class MyEnum(Enum): + """ + Base class for work with updated Enums + """ + @classmethod def list(cls) -> List[Enum]: return list(map(lambda c: c, cls)) @@ -16,20 +19,6 @@ class MyEnum(Enum): def list_names(cls) -> List[str]: return list(map(lambda c: c.name, cls)) - @DynamicClassAttribute - def name(self) -> str: - """ - The name of the Enum member - """ - return self._name_ - - @DynamicClassAttribute - def value(self) -> str: - """ - The name of the Enum member - """ - return self._value_ - class EndpointPostfixEnm(str, MyEnum): """