@@ -37,7 +37,7 @@ class Connector:
37
37
autogenerate : bool = False
38
38
loops : List [List [Pin ]] = field (default_factory = list )
39
39
40
- def __post_init__ (self ):
40
+ def __post_init__ (self ) -> None :
41
41
self .ports_left = False
42
42
self .ports_right = False
43
43
self .visible_pins = {}
@@ -81,7 +81,7 @@ def __post_init__(self):
81
81
if len (loop ) != 2 :
82
82
raise Exception ('Loops must be between exactly two pins!' )
83
83
84
- def activate_pin (self , pin ) :
84
+ def activate_pin (self , pin : Pin ) -> None :
85
85
self .visible_pins [pin ] = True
86
86
87
87
@@ -106,7 +106,7 @@ class Cable:
106
106
show_name : bool = True
107
107
show_wirecount : bool = True
108
108
109
- def __post_init__ (self ):
109
+ def __post_init__ (self ) -> None :
110
110
111
111
if isinstance (self .gauge , str ): # gauge and unit specified
112
112
try :
@@ -160,7 +160,10 @@ def __post_init__(self):
160
160
raise Exception ('lists of part data are only supported for bundles' )
161
161
162
162
163
- def connect (self , from_name , from_pin , via_pin , to_name , to_pin ):
163
+ # Pins = Union[Pin, Tuple[Pin, ...], None] # None, one, or a tuple of pins
164
+ # Wires = Union[Wire, Tuple[Wire, ...]] # One or a tuple of wires
165
+ # The *_pin arguments also accept a tuple, but it seems not in use with the current code.
166
+ def connect (self , from_name : Optional [Name ], from_pin : Optional [Pin ], via_pin : Wire , to_name : Optional [Name ], to_pin : Optional [Pin ]) -> None :
164
167
from_pin = int2tuple (from_pin )
165
168
via_pin = int2tuple (via_pin )
166
169
to_pin = int2tuple (to_pin )
0 commit comments