Browse Source

Fix typos (#368)

Dong-hyeon Shin 2 years ago
parent
commit
5aae6a122d

+ 1 - 1
pynecone/components/component.py

@@ -320,7 +320,7 @@ class Component(Base, ABC):
             # Extract the style for this component.
             # Extract the style for this component.
             component_style = Style(style[type(self)])
             component_style = Style(style[type(self)])
 
 
-            # Only add stylee props that are not overridden.
+            # Only add style props that are not overridden.
             component_style = {
             component_style = {
                 k: v for k, v in component_style.items() if k not in self.style
                 k: v for k, v in component_style.items() if k not in self.style
             }
             }

+ 1 - 1
pynecone/components/forms/switch.py

@@ -7,7 +7,7 @@ from pynecone.var import Var
 
 
 
 
 class Switch(ChakraComponent):
 class Switch(ChakraComponent):
-    """Togglable switch component."""
+    """Toggleable switch component."""
 
 
     tag = "Switch"
     tag = "Switch"
 
 

+ 1 - 1
pynecone/components/layout/grid.py

@@ -80,7 +80,7 @@ class ResponsiveGrid(ChakraComponent):
     # Shorthand prop for gridRow
     # Shorthand prop for gridRow
     row: Var[str]
     row: Var[str]
 
 
-    # Alist that defines the number of columns for each breakpoint.
+    # A list that defines the number of columns for each breakpoint.
     columns: Var[List[int]]
     columns: Var[List[int]]
 
 
     # The width at which child elements will break into columns. Pass a number for pixel values or a string for any other valid CSS length.
     # The width at which child elements will break into columns. Pass a number for pixel values or a string for any other valid CSS length.

+ 1 - 1
pynecone/components/layout/html.py

@@ -30,7 +30,7 @@ class Html(Box):
         Raises:
         Raises:
             ValueError: If children are not provided or more than one child is provided.
             ValueError: If children are not provided or more than one child is provided.
         """
         """
-        # If children are not prvided, throw an error.
+        # If children are not provided, throw an error.
         if len(children) != 1:
         if len(children) != 1:
             raise ValueError("Must provide children to the html component.")
             raise ValueError("Must provide children to the html component.")
         else:
         else:

+ 1 - 1
pynecone/components/overlay/alertdialog.py

@@ -48,7 +48,7 @@ class AlertDialog(ChakraComponent):
     size: Var[str]
     size: Var[str]
 
 
     # If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
     # If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
-    use_intert: Var[bool]
+    use_inert: Var[bool]
 
 
     @classmethod
     @classmethod
     def get_triggers(cls) -> Set[str]:
     def get_triggers(cls) -> Set[str]:

+ 1 - 1
pynecone/components/overlay/drawer.py

@@ -51,7 +51,7 @@ class Drawer(ChakraComponent):
     size: Var[str]
     size: Var[str]
 
 
     # A11y: If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
     # A11y: If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
-    use_intert: Var[bool]
+    use_inert: Var[bool]
 
 
     # Variant of drawer
     # Variant of drawer
     variant: Var[str]
     variant: Var[str]

+ 1 - 1
pynecone/components/overlay/menu.py

@@ -29,7 +29,7 @@ class Menu(ChakraComponent):
     # If by default the menu is open.
     # If by default the menu is open.
     default_is_open: Var[bool]
     default_is_open: Var[bool]
 
 
-    # If rtl, poper placement positions will be flipped i.e. 'top-right' will become 'top-left' and vice-verse ("ltr" | "rtl")
+    # If rtl, popper placement positions will be flipped i.e. 'top-right' will become 'top-left' and vice-verse ("ltr" | "rtl")
     direction: Var[str]
     direction: Var[str]
 
 
     # If true, the popper will change its placement and flip when it's about to overflow its boundary area.
     # If true, the popper will change its placement and flip when it's about to overflow its boundary area.

+ 1 - 1
pynecone/components/overlay/modal.py

@@ -48,7 +48,7 @@ class Modal(ChakraComponent):
     size: Var[str]
     size: Var[str]
 
 
     # A11y: If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
     # A11y: If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
-    use_intert: Var[bool]
+    use_inert: Var[bool]
 
 
     @classmethod
     @classmethod
     def get_triggers(cls) -> Set[str]:
     def get_triggers(cls) -> Set[str]:

+ 1 - 1
pynecone/components/overlay/tooltip.py

@@ -44,7 +44,7 @@ class Tooltip(ChakraComponent):
     # If true, the tooltip will show an arrow tip
     # If true, the tooltip will show an arrow tip
     has_arrow: Var[bool]
     has_arrow: Var[bool]
 
 
-    # If true, th etooltip with be disabled.
+    # If true, the tooltip with be disabled.
     is_disabled: Var[bool]
     is_disabled: Var[bool]
 
 
     # If true, the tooltip will be open.
     # If true, the tooltip will be open.

+ 3 - 3
pynecone/constants.py

@@ -212,11 +212,11 @@ class RouteRegex(SimpleNamespace):
     """Regex used for extracting route args in route."""
     """Regex used for extracting route args in route."""
 
 
     ARG = re.compile(r"\[(?!\.)([^\[\]]+)\]")
     ARG = re.compile(r"\[(?!\.)([^\[\]]+)\]")
-    # group return the catchall pattern (i.e "[[..slug]]")
+    # group return the catchall pattern (i.e. "[[..slug]]")
     CATCHALL = re.compile(r"(\[?\[\.{3}(?![0-9]).*\]?\])")
     CATCHALL = re.compile(r"(\[?\[\.{3}(?![0-9]).*\]?\])")
-    # group return the argname (i.e "slug")
+    # group return the arg name (i.e. "slug")
     STRICT_CATCHALL = re.compile(r"\[\.{3}([a-zA-Z_][\w]*)\]")
     STRICT_CATCHALL = re.compile(r"\[\.{3}([a-zA-Z_][\w]*)\]")
-    # group return the argname (i.e "slug")
+    # group return the arg name (i.e. "slug")
     OPT_CATCHALL = re.compile(r"\[\[\.{3}([a-zA-Z_][\w]*)\]\]")
     OPT_CATCHALL = re.compile(r"\[\[\.{3}([a-zA-Z_][\w]*)\]\]")
 
 
 
 

+ 1 - 1
pynecone/middleware/middleware.py

@@ -1,4 +1,4 @@
-"""Base Pynecone middelware."""
+"""Base Pynecone middleware."""
 from __future__ import annotations
 from __future__ import annotations
 
 
 from abc import ABC
 from abc import ABC