Skip to content

Commit ba805f0

Browse files
ilaifMidnighter
andcommitted
fix: clean up type annotations, add arguments
Co-authored-by: Midnighter <[email protected]>
1 parent b4aade2 commit ba805f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/structurizr/model/model_item.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ class ModelItemIO(BaseModel, ABC):
4141
4242
"""
4343

44-
id: str = Field("")
45-
tags: List[str] = Field([])
46-
properties: Dict[str, str] = Field({})
47-
perspectives: List[PerspectiveIO] = Field([])
44+
id: str = Field(default="")
45+
tags: List[str] = Field(default=[])
46+
properties: Dict[str, str] = Field(default={})
47+
perspectives: List[PerspectiveIO] = Field(default=[])
4848

4949
@validator("tags", pre=True)
5050
def split_tags(cls, tags: Union[str, List[str]]) -> List[str]:
@@ -79,7 +79,7 @@ def __init__(
7979
id: str = "",
8080
origin_id: str = "",
8181
tags: Iterable[str] = (),
82-
properties: [Dict[str, str]] = (),
82+
properties: Dict[str, str] = (),
8383
perspectives: Iterable[Perspective] = (),
8484
**kwargs
8585
):

0 commit comments

Comments
 (0)