Kaynağa Gözat

dang it darglint

Khaleel Al-Adhami 4 ay önce
ebeveyn
işleme
9a987caf76

+ 3 - 0
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.
         """

+ 0 - 6
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)
 

+ 3 - 0
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(

+ 3 - 0
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)

+ 0 - 8
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))