dang it darglint

This commit is contained in:
Khaleel Al-Adhami 2025-01-17 15:21:33 -08:00
parent c6f05bb320
commit 9a987caf76
5 changed files with 9 additions and 14 deletions

View File

@ -64,6 +64,9 @@ class Bare(Component):
def _get_all_imports(self, collapse: bool = False) -> ParsedImportDict: def _get_all_imports(self, collapse: bool = False) -> ParsedImportDict:
"""Include the imports for the component. """Include the imports for the component.
Args:
collapse: Whether to collapse the imports.
Returns: Returns:
The imports for the component. The imports for the component.
""" """

View File

@ -97,9 +97,6 @@ class Match(MemoizationLeaf):
Args: Args:
cases: The match cases. cases: The match cases.
Returns:
The processed match cases.
Raises: Raises:
ValueError: If the default case is not the last case or the tuple elements are less than 2. 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: Returns:
The match component wrapped in a fragment or the match var. 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) return MatchOperation.create(match_cond_var, match_cases, default)

View File

@ -718,6 +718,9 @@ def _generate_namespace_call_functiondef(
Returns: Returns:
The create functiondef node for the ast. 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 # add the imports needed by get_type_hint later
type_hint_globals.update( type_hint_globals.update(

View File

@ -848,6 +848,9 @@ def safe_issubclass(cls: Any, class_or_tuple: Any, /) -> bool:
Returns: Returns:
Whether the class is a subclass of the other class or tuple of classes. Whether the class is a subclass of the other class or tuple of classes.
Raises:
TypeError: If the arguments are invalid.
""" """
try: try:
return issubclass(cls, class_or_tuple) return issubclass(cls, class_or_tuple)

View File

@ -241,16 +241,8 @@ class VarData:
def merge(*all: VarData | None) -> VarData | None: def merge(*all: VarData | None) -> VarData | None:
"""Merge multiple var data objects. """Merge multiple var data objects.
Args:
*all: The var data objects to merge.
Raises:
ReflexError: If trying to merge VarData with different positions.
Returns: Returns:
The merged var data object. The merged var data object.
# noqa: DAR102 *all
""" """
all_var_datas = list(filter(None, all)) all_var_datas = list(filter(None, all))