(cls: Type[TIntEnum], value: int)
| 58 | |
| 59 | @classmethod |
| 60 | def to_text(cls: Type[TIntEnum], value: int) -> str: |
| 61 | cls._check_value(value) |
| 62 | try: |
| 63 | text = cls(value).name |
| 64 | except ValueError: |
| 65 | text = None |
| 66 | text = cls._extra_to_text(value, text) |
| 67 | if text is None: |
| 68 | text = f"{cls._prefix()}{value}" |
| 69 | return text |
| 70 | |
| 71 | @classmethod |
| 72 | def make(cls: Type[TIntEnum], value: int | str) -> TIntEnum: |
nothing calls this directly
no test coverage detected