Skip to content

Commit

Permalink
Add suggestions from wireviz#186
Browse files Browse the repository at this point in the history
  • Loading branch information
formatc1702 authored and kvid committed Sep 12, 2023
1 parent c3b07cf commit 162fe44
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wireviz/wv_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 162fe44

Please sign in to comment.