MCPcopy Index your code
hub / github.com/archlinux/archinstall / parse_arg

Method parse_arg

archinstall/lib/models/device.py:1207–1220  ·  view source on GitHub ↗
(cls, arg: _LvmVolumeSerialization)

Source from the content-addressed store, hash-verified

1205
1206 @classmethod
1207 def parse_arg(cls, arg: _LvmVolumeSerialization) -> Self:
1208 volume = cls(
1209 status=ModificationStatus(arg['status']),
1210 name=arg['name'],
1211 fs_type=FilesystemType(arg['fs_type']),
1212 length=Size.parse_args(arg['length']),
1213 mountpoint=Path(arg['mountpoint']) if arg['mountpoint'] else None,
1214 mount_options=arg.get('mount_options', []),
1215 btrfs_subvols=SubvolumeModification.parse_args(arg.get('btrfs', [])),
1216 )
1217
1218 volume._obj_id = arg['obj_id']
1219
1220 return volume
1221
1222 def json(self) -> _LvmVolumeSerialization:
1223 return {

Callers 4

parse_argMethod · 0.45
parse_argMethod · 0.45
parse_argMethod · 0.45
parse_argMethod · 0.45

Calls 3

ModificationStatusClass · 0.85
FilesystemTypeClass · 0.85
parse_argsMethod · 0.45

Tested by

no test coverage detected