From 2e983a65beb740479f30ead16abe0039690420ae Mon Sep 17 00:00:00 2001 From: Jennings Zhang Date: Sat, 22 Jul 2023 15:07:10 -0400 Subject: [PATCH] Use NewTypes --- aiochris/models/public.py | 9 ++++----- aiochris/types.py | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aiochris/models/public.py b/aiochris/models/public.py index 0ef670b..09c4e46 100644 --- a/aiochris/models/public.py +++ b/aiochris/models/public.py @@ -36,13 +36,12 @@ class PluginParameter(LinkedModel): Information about a parameter (a command-line option/flag) of a plugin. """ - # FIXME use NewTypes - url: str + url: PluginParameterUrl id: PluginParameterId - name: str - type: str + name: ParameterName + type: ParameterType optional: bool - default: Optional[Any] + default: Optional[ParameterType] flag: str short_flag: str action: Literal["store", "store_true", "store_false"] diff --git a/aiochris/types.py b/aiochris/types.py index 965b8ae..b250300 100644 --- a/aiochris/types.py +++ b/aiochris/types.py @@ -101,3 +101,5 @@ TagsUrl = NewType("TagsUrl", str) TaggingsUrl = NewType("TaggingsUrl", str) CommentsUrl = NewType("CommentsUrl", str) + +PluginParameterUrl = NewType("PluginParameterUrl", str)