Skip to content

Commit a050e9d

Browse files
committed
Update the types of dataclass attributes according to usage
Fixes #156
1 parent e2e8bbf commit a050e9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wireviz/DataClasses.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class Connector:
7979
pinlabels: List[Any] = field(default_factory=list)
8080
pins: List[Any] = field(default_factory=list)
8181
color: Optional[str] = None
82-
show_name: bool = None
83-
show_pincount: bool = None
82+
show_name: Optional[bool] = None
83+
show_pincount: Optional[bool] = None
8484
hide_disconnected_pins: bool = False
8585
autogenerate: bool = False
8686
loops: List[Any] = field(default_factory=list)
@@ -167,7 +167,7 @@ class Cable:
167167
length: float = 0
168168
color: Optional[str] = None
169169
wirecount: Optional[int] = None
170-
shield: bool = False
170+
shield: Union[bool, str] = False # False | True | color
171171
image: Optional[Image] = None
172172
notes: Optional[str] = None
173173
colors: List[Any] = field(default_factory=list)

0 commit comments

Comments
 (0)