Use auto() for eligible StrEnum members (#4411)
This commit is contained in:
parent
51600ecd2a
commit
d6de03ab76
|
|
@ -5,7 +5,7 @@ from typing import Any, NotRequired, Self, TypedDict
|
||||||
|
|
||||||
class PowerManagement(StrEnum):
|
class PowerManagement(StrEnum):
|
||||||
POWER_PROFILES_DAEMON = 'power-profiles-daemon'
|
POWER_PROFILES_DAEMON = 'power-profiles-daemon'
|
||||||
TUNED = 'tuned'
|
TUNED = auto()
|
||||||
|
|
||||||
|
|
||||||
class PowerManagementConfigSerialization(TypedDict):
|
class PowerManagementConfigSerialization(TypedDict):
|
||||||
|
|
@ -31,7 +31,7 @@ class PrintServiceConfigSerialization(TypedDict):
|
||||||
|
|
||||||
|
|
||||||
class Firewall(StrEnum):
|
class Firewall(StrEnum):
|
||||||
UFW = 'ufw'
|
UFW = auto()
|
||||||
FWD = 'firewalld'
|
FWD = 'firewalld'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,11 +40,11 @@ class FirewallConfigSerialization(TypedDict):
|
||||||
|
|
||||||
|
|
||||||
class ZramAlgorithm(StrEnum):
|
class ZramAlgorithm(StrEnum):
|
||||||
ZSTD = 'zstd'
|
ZSTD = auto()
|
||||||
LZO_RLE = 'lzo-rle'
|
LZO_RLE = 'lzo-rle'
|
||||||
LZO = 'lzo'
|
LZO = auto()
|
||||||
LZ4 = 'lz4'
|
LZ4 = auto()
|
||||||
LZ4HC = 'lz4hc'
|
LZ4HC = auto()
|
||||||
|
|
||||||
|
|
||||||
class ApplicationSerialization(TypedDict):
|
class ApplicationSerialization(TypedDict):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue