Skip to content

Commit a72341d

Browse files
committed
Change classmethods to staticmethods
1 parent 43509d8 commit a72341d

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

archinstall/lib/disk/fido.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,8 @@ def get_cryptenroll_devices(cls, reload: bool = False) -> list[Fido2Device]:
101101

102102
return cls._cryptenroll_devices
103103

104-
@classmethod
105-
def fido2_enroll(
106-
cls,
107-
hsm_device: Fido2Device,
108-
dev_path: Path,
109-
password: Password,
110-
) -> None:
104+
@staticmethod
105+
def fido2_enroll(hsm_device: Fido2Device, dev_path: Path, password: Password) -> None:
111106
worker = SysCommandWorker(f'systemd-cryptenroll --fido2-device={hsm_device.path} {dev_path}', peek_output=True)
112107
pw_inputted = False
113108
pin_inputted = False

archinstall/lib/models/device.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,9 +1495,8 @@ def json(self) -> _DiskEncryptionSerialization:
14951495

14961496
return obj
14971497

1498-
@classmethod
1498+
@staticmethod
14991499
def validate_enc(
1500-
cls,
15011500
modifications: list[DeviceModification],
15021501
lvm_config: LvmConfiguration | None = None,
15031502
) -> bool:

archinstall/lib/models/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ def from_wpa_cli_output(cls, list_networks: str) -> list[WifiConfiguredNetwork]:
266266

267267
return networks
268268

269-
@classmethod
270-
def _extract_flags(cls, flag_string: str) -> list[str]:
269+
@staticmethod
270+
def _extract_flags(flag_string: str) -> list[str]:
271271
pattern = r'\[([^\]]+)\]'
272272

273273
extracted_values = re.findall(pattern, flag_string)

archinstall/lib/output.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616

1717
class FormattedOutput:
18-
@classmethod
18+
@staticmethod
1919
def _get_values(
20-
cls,
2120
o: 'DataclassInstance',
2221
class_formatter: str | Callable | None = None, # type: ignore[type-arg]
2322
filter_list: list[str] = [],
@@ -110,8 +109,8 @@ def as_table(
110109

111110
return output
112111

113-
@classmethod
114-
def as_columns(cls, entries: list[str], cols: int) -> str:
112+
@staticmethod
113+
def as_columns(entries: list[str], cols: int) -> str:
115114
"""
116115
Will format a list into a given number of columns
117116
"""

0 commit comments

Comments
 (0)