diff options
Diffstat (limited to 'vk/tracking/db/format.py')
| -rw-r--r-- | vk/tracking/db/format.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/vk/tracking/db/format.py b/vk/tracking/db/format.py index 7c5ff33..29f5c4c 100644 --- a/vk/tracking/db/format.py +++ b/vk/tracking/db/format.py @@ -3,7 +3,7 @@ # For details, see https://github.com/egor-tensin/vk-scripts # Distributed under the MIT License. -from enum import Enum +from enum import auto, StrEnum import sys from vk.utils import io @@ -11,13 +11,10 @@ from vk.utils import io from . import backend -class Format(Enum): - CSV = "csv" - LOG = "log" - NULL = "null" - - def __str__(self): - return self.value +class Format(StrEnum): + CSV = auto() + LOG = auto() + NULL = auto() def create_writer(self, fd=sys.stdout): if self is Format.CSV: |
