mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-28 13:33:57 +00:00
Update formatting according to new black version
Signed-off-by: Till Maas <opensource@till.name>
This commit is contained in:
parent
062b3a40ac
commit
9a6bdb5403
5 changed files with 83 additions and 44 deletions
|
|
@ -64,11 +64,15 @@ def parse_validator(validator):
|
|||
if isinstance(validator, av.ArgValidatorDict):
|
||||
res = {}
|
||||
for k, v in validator.nested.items():
|
||||
if v.name not in (
|
||||
"infiniband_transport_mode",
|
||||
"infiniband_p_key",
|
||||
"vlan_id",
|
||||
) and not isinstance(v, av.ArgValidatorDeprecated):
|
||||
if (
|
||||
v.name
|
||||
not in (
|
||||
"infiniband_transport_mode",
|
||||
"infiniband_p_key",
|
||||
"vlan_id",
|
||||
)
|
||||
and not isinstance(v, av.ArgValidatorDeprecated)
|
||||
):
|
||||
name = k
|
||||
if not validator.required:
|
||||
pass
|
||||
|
|
@ -165,7 +169,12 @@ def prioritize(key):
|
|||
yaml.add_representer(dict, represent_dict)
|
||||
sorted_data = priority_sorted([parse_validator(av.ArgValidator_DictConnection())])
|
||||
yaml_example = (
|
||||
yaml.dump(sorted_data, explicit_start=True, default_flow_style=False, width=100,)
|
||||
yaml.dump(
|
||||
sorted_data,
|
||||
explicit_start=True,
|
||||
default_flow_style=False,
|
||||
width=100,
|
||||
)
|
||||
.replace(COMMENT, "#")
|
||||
.replace(EMPTY, "")
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue