Add suggestions from #186

This commit is contained in:
Daniel Rojas 2022-08-05 18:45:48 +02:00 committed by Laurier Loiselle
parent b075e06d58
commit 1faaff078a
No known key found for this signature in database
GPG Key ID: 345920CC72089A3F
2 changed files with 5 additions and 4 deletions

View File

@ -747,7 +747,7 @@ class Cable(TopLevelGraphicalComponent):
if self.show_name is None:
self.show_name = not self.is_autogenerated
if not self.show_wirenumbers:
if self.show_wirenumbers is None:
# by default, show wire numbers for cables, hide for bundles
self.show_wirenumbers = self.category != "bundle"

View File

@ -70,9 +70,10 @@ def expand(yaml_data):
def get_single_key_and_value(d: dict):
k = list(d.keys())[0]
v = d[k]
return (k, v)
# used for defining a line in a harness' connection set
# E.g. for the YAML input `- X1: 1`
# this function returns a tuple in the form ("X1", "1")
return next(iter(d.items()))
def int2tuple(inp):