MCPcopy Create free account
hub / github.com/archlinux/archinstall / as_summary

Method as_summary

archinstall/lib/args.py:446–467  ·  view source on GitHub ↗

Render a concise two-column summary of the current configuration. Returns an empty string if nothing meaningful to show.

(self)

Source from the content-addressed store, hash-verified

444 target.chmod(stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP)
445
446 def as_summary(self) -> str:
447 """
448 Render a concise two-column summary of the current configuration.
449
450 Returns an empty string if nothing meaningful to show.
451 """
452 cfg: dict[str, str | list[str] | bool] = {}
453
454 for key, value in self.plain_cfg().items():
455 cfg[key.text()] = value
456
457 for config_type, obj in self.sub_cfg().items():
458 if not hasattr(obj, 'summary'):
459 continue
460
461 summary = obj.summary()
462 if summary:
463 cfg[config_type.text()] = summary
464
465 simple_summary = as_key_value_pair(cfg, ignore_empty=True)
466
467 return simple_summary
468
469
470class ArchConfigHandler:

Callers 1

Calls 6

plain_cfgMethod · 0.95
sub_cfgMethod · 0.95
as_key_value_pairFunction · 0.90
textMethod · 0.80
itemsMethod · 0.45
summaryMethod · 0.45

Tested by

no test coverage detected