Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
formatc1702 committed Jul 20, 2020
1 parent f885feb commit d503b2d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/wireviz/DataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,10 @@ def __post_init__(self):
raise Exception('Pins are not unique')

if self.show_name is None:
if self.autogenerate:
self.show_name = False # hide auto-generated designators by default
else:
self.show_name = True
self.show_name = not self.autogenerate # hide auto-generated designators by default

if self.show_pincount is None:
if self.style == 'simple':
self.show_pincount = False # hide pincount for simple connectors, since they are 1 pin connectors by definition
else:
self.show_pincount = True
self.show_pincount = self.style != 'simple' # hide pincount for simple (1 pin) connectors by default

for loop in self.loops:
# TODO: check that pins to connect actually exist
Expand Down

0 comments on commit d503b2d

Please sign in to comment.