aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/os.py
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-09 12:08:53 +0500
committerEgor Tensin <egor@tensin.name>2026-10-09 12:08:53 +0500
commitb6078e1d19235301948766721a7d9f4903b98745 (patch)
tree1ccc8ea3988fc23f543e7955a047335ffadee3ba /project/os.py
parentminor imports refactoring (diff)
downloadcmake-common-b6078e1d19235301948766721a7d9f4903b98745.tar.gz
cmake-common-b6078e1d19235301948766721a7d9f4903b98745.zip
ugprade to StrEnum
Diffstat (limited to 'project/os.py')
-rw-r--r--project/os.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/project/os.py b/project/os.py
index 4ddf703..199086f 100644
--- a/project/os.py
+++ b/project/os.py
@@ -3,17 +3,14 @@
# For details, see https://github.com/egor-tensin/cmake-common
# Distributed under the MIT License.
-from enum import Enum
+from enum import auto, StrEnum
import platform
-class OS(Enum):
- WINDOWS = "Windows"
- LINUX = "Linux"
- MACOS = "macOS"
-
- def __str__(self):
- return str(self.value)
+class OS(StrEnum):
+ WINDOWS = auto()
+ LINUX = auto()
+ MACOS = auto()
@staticmethod
def current():