From b22b243d8f470e896401b9856bd5f05a5885e92e Mon Sep 17 00:00:00 2001 From: daquinteroflex Date: Thu, 8 Aug 2024 10:20:06 +0100 Subject: [PATCH] Test removing default types --- docs/notebooks | 2 +- tidy3d/components/base.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/notebooks b/docs/notebooks index 96905e6f3..8494aa108 160000 --- a/docs/notebooks +++ b/docs/notebooks @@ -1 +1 @@ -Subproject commit 96905e6f3c81c09437ceff59aef3e51efe17e5cc +Subproject commit 8494aa108cbc4878c5d7b3e7965a7d93d1dd2178 diff --git a/tidy3d/components/base.py b/tidy3d/components/base.py index 86daf7f0d..3196f4498 100644 --- a/tidy3d/components/base.py +++ b/tidy3d/components/base.py @@ -1089,8 +1089,7 @@ def generate_docstring(cls) -> str: default_val = field.get_default() if "=" in str(default_val): # handle cases where default values are pydantic models - default_val = f"{default_val.__class__.__name__}({default_val})" - default_val = (", ").join(default_val.split(" ")) + default_val = f"{default_val.__class__.__name__}" # make first line: name : type = default default_str = "" if field.required else f" = {default_val}"