diff --git a/reflex/components/base/bare.py b/reflex/components/base/bare.py index 6690a5cc1..4b601544f 100644 --- a/reflex/components/base/bare.py +++ b/reflex/components/base/bare.py @@ -64,6 +64,9 @@ class Bare(Component): def _get_all_imports(self, collapse: bool = False) -> ParsedImportDict: """Include the imports for the component. + Args: + collapse: Whether to collapse the imports. + Returns: The imports for the component. """ diff --git a/reflex/components/core/match.py b/reflex/components/core/match.py index 8b577a261..e697be7b2 100644 --- a/reflex/components/core/match.py +++ b/reflex/components/core/match.py @@ -97,9 +97,6 @@ class Match(MemoizationLeaf): Args: cases: The match cases. - Returns: - The processed match cases. - Raises: ValueError: If the default case is not the last case or the tuple elements are less than 2. """ @@ -165,9 +162,6 @@ class Match(MemoizationLeaf): Returns: The match component wrapped in a fragment or the match var. - - Raises: - ValueError: If the return types are not vars when creating a match var for Var types. """ return MatchOperation.create(match_cond_var, match_cases, default) diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index c1c9bc352..e6f40c2b5 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -718,6 +718,9 @@ def _generate_namespace_call_functiondef( Returns: The create functiondef node for the ast. + + Raises: + TypeError: If the __call__ method does not have a __func__. """ # add the imports needed by get_type_hint later type_hint_globals.update( diff --git a/reflex/utils/types.py b/reflex/utils/types.py index e323c5441..a27be80c5 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -848,6 +848,9 @@ def safe_issubclass(cls: Any, class_or_tuple: Any, /) -> bool: Returns: Whether the class is a subclass of the other class or tuple of classes. + + Raises: + TypeError: If the arguments are invalid. """ try: return issubclass(cls, class_or_tuple) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 859bdcdc4..521bdc997 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -241,16 +241,8 @@ class VarData: def merge(*all: VarData | None) -> VarData | None: """Merge multiple var data objects. - Args: - *all: The var data objects to merge. - - Raises: - ReflexError: If trying to merge VarData with different positions. - Returns: The merged var data object. - - # noqa: DAR102 *all """ all_var_datas = list(filter(None, all))