From 3f091bb419df20ff24ee23b0cd2fddfacf40d12b Mon Sep 17 00:00:00 2001 From: KV Date: Tue, 1 Sep 2020 18:09:01 +0200 Subject: [PATCH] Update the types of dataclass attributes according to usage Fixes #156 --- src/wireviz/DataClasses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index e813fbe3..529ad308 100644 --- a/src/wireviz/DataClasses.py +++ b/src/wireviz/DataClasses.py @@ -79,8 +79,8 @@ class Connector: pinlabels: List[Any] = field(default_factory=list) pins: List[Any] = field(default_factory=list) color: Optional[str] = None - show_name: bool = None - show_pincount: bool = None + show_name: Optional[bool] = None + show_pincount: Optional[bool] = None hide_disconnected_pins: bool = False autogenerate: bool = False loops: List[Any] = field(default_factory=list) @@ -167,7 +167,7 @@ class Cable: length: float = 0 color: Optional[str] = None wirecount: Optional[int] = None - shield: bool = False + shield: Union[bool, str] = False # False | True | color image: Optional[Image] = None notes: Optional[str] = None colors: List[Any] = field(default_factory=list)