11import itertools
2- from enum import Enum
2+ from enum import StrEnum
33from pathlib import Path
44from typing import Annotated
55
273273]
274274
275275
276- class VariableFormat (Enum ):
277- minimize = "minimize "
276+ class VariableFormat (StrEnum ):
277+ minimized = "minimized "
278278 decimal = "decimal"
279279 hex = "hex"
280280
281281 def iter_variables (self ):
282282 match self :
283- case VariableFormat .minimize :
283+ case VariableFormat .minimized :
284284 for c1 in VARIABLE_NAME_CHARS :
285285 for c2 in VARIABLE_NAME_CHARS :
286286 yield c1 + c2
@@ -317,7 +317,7 @@ def lookup(
317317 variable_format : Annotated [
318318 VariableFormat ,
319319 Option ("-f" , "--format" ),
320- ] = VariableFormat .hex ,
320+ ] = VariableFormat .minimized ,
321321):
322322 address = int (address_str , base = 0 )
323323
@@ -342,7 +342,7 @@ def build(
342342 variable_format : Annotated [
343343 VariableFormat ,
344344 Option ("-f" , "--format" ),
345- ] = VariableFormat .hex ,
345+ ] = VariableFormat .minimized ,
346346 out : Path = Path ("schematics" ),
347347):
348348 lookup_procs , ram_proc = generate_code (ram_size , variable_format )
0 commit comments