From f0ad72f9571549f29bfc3e7b7d4ad3a637f1dbbe Mon Sep 17 00:00:00 2001 From: Cecilie Seim <68303562+tilen1976@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:29:51 +0200 Subject: [PATCH] remove unused method _missing method in enum.py --- src/datadoc/enums.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/datadoc/enums.py b/src/datadoc/enums.py index 0990656a..e6d7e5a6 100644 --- a/src/datadoc/enums.py +++ b/src/datadoc/enums.py @@ -24,19 +24,6 @@ def __init__( self._value_ = self.name self.language_strings = language_strings - # TODO(@tilen1976: remove?) # noqa: TD004, TD003 - @classmethod - def _missing_(cls, value: object) -> LanguageStringsEnum: - """Support constructing an enum member from a supplied name string.""" - try: - member: LanguageStringsEnum = cls._member_map_[str(value)] # type: ignore [assignment] - except KeyError as e: - # Raise the expected exception with a useful explanation - message = f"{value} is not a valid {cls.__qualname__}" - raise ValueError(message) from e - else: - return member - def get_value_for_language( self, language: enums.SupportedLanguages,