Skip to content

Commit ee73b3c

Browse files
committed
fixed linter error
1 parent c4f6848 commit ee73b3c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎robusta_cli/main.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import time
66
import traceback
77
import uuid
8-
from typing import Dict, List, Literal, Optional, Union
8+
from enum import Enum
9+
from typing import Dict, List, Optional, Union
910

1011
import certifi
1112
import typer
@@ -61,7 +62,10 @@ def add_custom_certificate(custom_ca: str):
6162
app.add_typer(self_host_commands, name="self-host", help="Self-host commands menu")
6263

6364

64-
ClusterSize = Literal["small", "medium", "large"]
65+
class ClusterSize(str, Enum):
66+
small = "small"
67+
medium = "medium"
68+
large = "large"
6569

6670
# Resource configurations per cluster size (by CPU count):
6771
# small: < 16 CPUs
@@ -343,7 +347,7 @@ def gen_config(
343347

344348
# cluster_size (new) and is_small_cluster (legacy) are mutually exclusive
345349
if cluster_size:
346-
size_resources = CLUSTER_SIZE_RESOURCES.get(cluster_size)
350+
size_resources = CLUSTER_SIZE_RESOURCES.get(cluster_size.value)
347351
if size_resources:
348352
if "kubewatch" in size_resources:
349353
values.kubewatch = {"resources": size_resources["kubewatch"]}

0 commit comments

Comments
 (0)