Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/models
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/models')
-rw-r--r--archinstall/lib/models/audio_configuration.py2
-rw-r--r--archinstall/lib/models/bootloader.py8
-rw-r--r--archinstall/lib/models/network_configuration.py6
3 files changed, 8 insertions, 8 deletions
diff --git a/archinstall/lib/models/audio_configuration.py b/archinstall/lib/models/audio_configuration.py
index 3a4029db..88cd5d8e 100644
--- a/archinstall/lib/models/audio_configuration.py
+++ b/archinstall/lib/models/audio_configuration.py
@@ -24,7 +24,7 @@ class Audio(Enum):
class AudioConfiguration:
audio: Audio
- def __dump__(self) -> Dict[str, Any]:
+ def json(self) -> Dict[str, Any]:
return {
'audio': self.audio.value
}
diff --git a/archinstall/lib/models/bootloader.py b/archinstall/lib/models/bootloader.py
index be9812a0..fa3f32c8 100644
--- a/archinstall/lib/models/bootloader.py
+++ b/archinstall/lib/models/bootloader.py
@@ -14,12 +14,12 @@ class Bootloader(Enum):
Efistub = 'Efistub'
Limine = 'Limine'
- def json(self):
+ def json(self) -> str:
return self.value
- @classmethod
- def values(cls) -> List[str]:
- return [e.value for e in cls]
+ @staticmethod
+ def values() -> List[str]:
+ return [e.value for e in Bootloader]
@classmethod
def get_default(cls) -> Bootloader:
diff --git a/archinstall/lib/models/network_configuration.py b/archinstall/lib/models/network_configuration.py
index fac7bbef..1777df62 100644
--- a/archinstall/lib/models/network_configuration.py
+++ b/archinstall/lib/models/network_configuration.py
@@ -42,7 +42,7 @@ class Nic:
'dns': self.dns
}
- def __dump__(self) -> Dict[str, Any]:
+ def json(self) -> Dict[str, Any]:
return {
'iface': self.iface,
'ip': self.ip,
@@ -94,10 +94,10 @@ class NetworkConfiguration:
type: NicType
nics: List[Nic] = field(default_factory=list)
- def __dump__(self) -> Dict[str, Any]:
+ def json(self) -> Dict[str, Any]:
config: Dict[str, Any] = {'type': self.type.value}
if self.nics:
- config['nics'] = [n.__dump__() for n in self.nics]
+ config['nics'] = [n.json() for n in self.nics]
return config