mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-26 18:25:36 -04:00
config: more fixes for scheme.py
This commit is contained in:
parent
7eefafc386
commit
30d9be0950
3 changed files with 31 additions and 20 deletions
|
@ -4,6 +4,8 @@ from dataclasses import dataclass
|
|||
from typing import Optional, Union, Mapping, Any, get_type_hints, get_origin, get_args, Iterable
|
||||
from munch import Munch
|
||||
|
||||
from constants import Arch
|
||||
|
||||
|
||||
def munchclass(*args, init=False, **kwargs):
|
||||
return dataclass(*args, init=init, **kwargs)
|
||||
|
@ -157,3 +159,19 @@ class Config(DataClass):
|
|||
_vals |= values
|
||||
|
||||
return Config(**_vals, validate=validate)
|
||||
|
||||
|
||||
@munchclass()
|
||||
class RuntimeConfiguration(DataClass):
|
||||
verbose: bool
|
||||
config_file: Optional[str]
|
||||
arch: Optional[Arch]
|
||||
no_wrap: bool
|
||||
script_source_dir: str
|
||||
error_shell: bool
|
||||
|
||||
|
||||
@munchclass()
|
||||
class ConfigLoadState(DataClass):
|
||||
load_finished = False
|
||||
exception = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue