Skip to content

Commit

Permalink
Add suggestions from #186
Browse files Browse the repository at this point in the history
  • Loading branch information
formatc1702 committed Aug 5, 2022
1 parent e51634d commit d69e3ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/wireviz/wv_dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def __post_init__(self) -> None:
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"

Expand Down
8 changes: 5 additions & 3 deletions src/wireviz/wv_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ 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")
import pudb; pudb.set_trace()
return next(iter(d.items()))


def int2tuple(inp):
Expand Down

0 comments on commit d69e3ba

Please sign in to comment.