From f44d0edc382e4ad1e613d40f5edfb22e067ed95d Mon Sep 17 00:00:00 2001 From: Benedikt Bartscher Date: Fri, 1 Mar 2024 23:04:21 +0100 Subject: [PATCH] add Component.is_default bool type annotation --- reflex/components/base/head.py | 2 +- reflex/components/base/script.py | 2 +- reflex/components/chakra/base.py | 2 +- reflex/components/core/client_side_routing.py | 2 +- reflex/components/core/upload.py | 2 +- reflex/components/datadisplay/dataeditor.py | 2 +- reflex/components/markdown/markdown.py | 2 +- reflex/components/moment/moment.py | 2 +- reflex/components/next/image.py | 2 +- reflex/components/next/link.py | 2 +- reflex/components/next/video.py | 2 +- reflex/components/plotly/plotly.py | 2 +- reflex/components/radix/themes/base.py | 2 +- reflex/components/react_player/react_player.py | 2 +- reflex/components/suneditor/editor.py | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/reflex/components/base/head.py b/reflex/components/base/head.py index 34a5e71af..cd9a3d1b6 100644 --- a/reflex/components/base/head.py +++ b/reflex/components/base/head.py @@ -14,4 +14,4 @@ class Head(NextHeadLib, MemoizationLeaf): tag: str = "NextHead" - is_default = True + is_default: bool = True diff --git a/reflex/components/base/script.py b/reflex/components/base/script.py index b3fe74f49..f3d2425bc 100644 --- a/reflex/components/base/script.py +++ b/reflex/components/base/script.py @@ -21,7 +21,7 @@ class Script(Component): library = "next/script" tag: str = "Script" - is_default = True + is_default: bool = True # Required unless inline script is used src: Optional[Var[str]] = None diff --git a/reflex/components/chakra/base.py b/reflex/components/chakra/base.py index ab5028646..fdfd6c3dd 100644 --- a/reflex/components/chakra/base.py +++ b/reflex/components/chakra/base.py @@ -94,7 +94,7 @@ class ChakraColorModeProvider(Component): library = "/components/reflex/chakra_color_mode_provider.js" tag: str = "ChakraColorModeProvider" - is_default = True + is_default: bool = True chakra_color_mode_provider = ChakraColorModeProvider.create() diff --git a/reflex/components/core/client_side_routing.py b/reflex/components/core/client_side_routing.py index 4a145b098..65530a880 100644 --- a/reflex/components/core/client_side_routing.py +++ b/reflex/components/core/client_side_routing.py @@ -63,6 +63,6 @@ class Default404Page(Component): library = "next/error" tag: str = "Error" - is_default = True + is_default: bool = True status_code: Var[int] = 404 # type: ignore diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py index 698540fb3..d5f4ca206 100644 --- a/reflex/components/core/upload.py +++ b/reflex/components/core/upload.py @@ -168,7 +168,7 @@ class Upload(MemoizationLeaf): tag: str = "ReactDropzone" - is_default = True + is_default: bool = True # The list of accepted file types. This should be a dictionary of MIME types as keys and array of file formats as # values. diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index 82a243424..eefc14c29 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -107,7 +107,7 @@ class DataEditor(NoSSRComponent): """The DataEditor Component.""" tag: str = "DataEditor" - is_default = True + is_default: bool = True library: str = "@glideapps/glide-data-grid@^5.3.0" lib_dependencies: List[str] = [ "lodash@^4.17.21", diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index 31865fc0b..d19435ac2 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -79,7 +79,7 @@ class Markdown(Component): tag: str = "ReactMarkdown" - is_default = True + is_default: bool = True # The component map from a tag to a lambda that creates a component. component_map: Dict[str, Any] = {} diff --git a/reflex/components/moment/moment.py b/reflex/components/moment/moment.py index 65dcde23a..ddca517bf 100644 --- a/reflex/components/moment/moment.py +++ b/reflex/components/moment/moment.py @@ -25,7 +25,7 @@ class Moment(NoSSRComponent): """The Moment component.""" tag: str = "Moment" - is_default = True + is_default: bool = True library: str = "react-moment" lib_dependencies: List[str] = ["moment"] diff --git a/reflex/components/next/image.py b/reflex/components/next/image.py index b89259974..521f0988e 100644 --- a/reflex/components/next/image.py +++ b/reflex/components/next/image.py @@ -12,7 +12,7 @@ class Image(NextComponent): tag: str = "Image" library = "next/image" - is_default = True + is_default: bool = True # This can be either an absolute external URL, or an internal path src: Optional[Var[Any]] = None diff --git a/reflex/components/next/link.py b/reflex/components/next/link.py index e3ddfc6c6..fb8b46f24 100644 --- a/reflex/components/next/link.py +++ b/reflex/components/next/link.py @@ -13,7 +13,7 @@ class NextLink(Component): tag: str = "NextLink" - is_default = True + is_default: bool = True # The page to link to. href: Optional[Var[str]] = None diff --git a/reflex/components/next/video.py b/reflex/components/next/video.py index 45d77cce6..6565f2f45 100644 --- a/reflex/components/next/video.py +++ b/reflex/components/next/video.py @@ -12,7 +12,7 @@ class Video(NextComponent): tag: str = "Video" library = "next-video" - is_default = True + is_default: bool = True # the URL src: Optional[Var[str]] = None diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index 0b9185e64..74ee11a90 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -23,7 +23,7 @@ class Plotly(PlotlyLib): tag: str = "Plot" - is_default = True + is_default: bool = True # The figure to display. This can be a plotly figure or a plotly data json. data: Optional[Var[Figure]] = None diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index 4157b47d0..ca5602bb9 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -218,7 +218,7 @@ class RadixThemesColorModeProvider(Component): library = "/components/reflex/radix_themes_color_mode_provider.js" tag: str = "RadixThemesColorModeProvider" - is_default = True + is_default: bool = True theme = Theme.create diff --git a/reflex/components/react_player/react_player.py b/reflex/components/react_player/react_player.py index 13beb8b5b..773569504 100644 --- a/reflex/components/react_player/react_player.py +++ b/reflex/components/react_player/react_player.py @@ -16,7 +16,7 @@ class ReactPlayer(NoSSRComponent): tag: str = "ReactPlayer" - is_default = True + is_default: bool = True # The url of a video or song to play url: Optional[Var[str]] = None diff --git a/reflex/components/suneditor/editor.py b/reflex/components/suneditor/editor.py index dd7f9306b..02815fea3 100644 --- a/reflex/components/suneditor/editor.py +++ b/reflex/components/suneditor/editor.py @@ -77,7 +77,7 @@ class Editor(NoSSRComponent): tag: str = "SunEditor" - is_default = True + is_default: bool = True lib_dependencies: List[str] = ["suneditor"]