From 8a22ed347ce2325c6058e50ca5500dc6aee0a867 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Tue, 10 Dec 2024 20:41:53 +0100 Subject: [PATCH] fix double strip --- reflex/components/el/elements/base.pyi | 50 +++++++++++++------------- reflex/utils/pyi_generator.py | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi index 88c9a3891..4d1d2c5c4 100644 --- a/reflex/components/el/elements/base.pyi +++ b/reflex/components/el/elements/base.pyi @@ -66,32 +66,32 @@ class BaseHTML(Element): """Create the component. Args: - *children: The children of the component. - access_key: Provides a hint for generating a keyboard shortcut for the current element. - auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. - content_editable: Indicates whether the element's content is editable. - context_menu: Defines the ID of a element which will serve as the element's context menu. - dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) - draggable: Defines whether the element can be dragged. - enter_key_hint: Hints what media types the media element is able to play. - hidden: Defines whether the element is hidden. - input_mode: Defines the type of the element. - item_prop: Defines the name of the element for metadata purposes. - lang: Defines the language used in the element. - role: Defines the role of the element. - slot: Assigns a slot in a shadow DOM shadow tree to an element. - spell_check: Defines whether the element may be checked for spelling errors. - tab_index: Defines the position of the current element in the tabbing order. - title: Defines a tooltip for the element. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - custom_attrs: custom attribute - **props: The props of the component. + *children: The children of the component. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The props of the component. Returns: - The component. + The component. """ ... diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index 82ab47513..2d3d2664e 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -263,7 +263,7 @@ def _generate_docstrings(clzs: list[Type[Component]], props: list[str]) -> str: # Get comments for prop if line.strip().startswith("#"): # Remove noqa from the comments. - line = line.partition(" # noqa")[0].strip() + line = line.partition(" # noqa")[0] comments.append(line) continue