mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
better perf
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
__all__ = ["ResponseStatus"]
|
||||
|
||||
from enum import Enum
|
||||
from typing import Self
|
||||
|
||||
|
||||
class ResponseStatus(Enum):
|
||||
@@ -10,7 +11,7 @@ class ResponseStatus(Enum):
|
||||
UNDEFINED_AND_INVALID_FLAGS = "UNDEFINED_AND_INVALID_FLAGS"
|
||||
|
||||
@classmethod
|
||||
def from_flags(cls, *, has_invalid_value_flags: bool, has_undefined_flags: bool) -> "ResponseStatus":
|
||||
def from_flags(cls, *, has_invalid_value_flags: bool, has_undefined_flags: bool) -> Self:
|
||||
key = (has_invalid_value_flags, has_undefined_flags)
|
||||
status_map: dict[tuple[bool, bool], ResponseStatus] = {
|
||||
(True, True): cls.UNDEFINED_AND_INVALID_FLAGS,
|
||||
|
||||
Reference in New Issue
Block a user