From c8fd8e4183576c7e7d7860f1f2074d1c0a920dea Mon Sep 17 00:00:00 2001 From: Michelle Tran Date: Thu, 22 Aug 2024 20:20:37 -0400 Subject: [PATCH] Add pydantic --- func.py | 3 --- play_with_pydantic.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 play_with_pydantic.py diff --git a/func.py b/func.py index 8449e52..f3aabab 100644 --- a/func.py +++ b/func.py @@ -11,6 +11,3 @@ def more_untested(): return "hello world" -def even_more_untested(): - return "another line" - diff --git a/play_with_pydantic.py b/play_with_pydantic.py new file mode 100644 index 0000000..cb1a979 --- /dev/null +++ b/play_with_pydantic.py @@ -0,0 +1,10 @@ +from pydantic.dataclasses import dataclass + +@dataclass +class Foo: + bar: str + + +if __name__ == "__main__": + print(Foo(bar="hello")) + print(Foo(bar="hello", not_valid="huh"))