Browse Source

add Component.is_default bool type annotation

Benedikt Bartscher 1 year ago
parent
commit
f44d0edc38

+ 1 - 1
reflex/components/base/head.py

@@ -14,4 +14,4 @@ class Head(NextHeadLib, MemoizationLeaf):
 
     tag: str = "NextHead"
 
-    is_default = True
+    is_default: bool = True

+ 1 - 1
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

+ 1 - 1
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()

+ 1 - 1
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

+ 1 - 1
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.

+ 1 - 1
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",

+ 1 - 1
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] = {}

+ 1 - 1
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"]
 

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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
 

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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"]