Skip to content

Commit

Permalink
dang it darglint
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 committed Jan 17, 2025
1 parent c6f05bb commit 9a987ca
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
3 changes: 3 additions & 0 deletions reflex/components/base/bare.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def _get_all_hooks(self) -> dict[str, VarData | None]:
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.
"""
Expand Down
6 changes: 0 additions & 6 deletions reflex/components/core/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ def _process_match_cases(cls, cases: tuple[CASE_TYPE[VAR_TYPE], ...]):
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.
"""
Expand Down Expand Up @@ -165,9 +162,6 @@ def _create_match_cond_var_or_component(
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)

Expand Down
3 changes: 3 additions & 0 deletions reflex/utils/pyi_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions reflex/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions reflex/vars/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,8 @@ def old_school_imports(self) -> ImportDict:
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))

Expand Down

0 comments on commit 9a987ca

Please sign in to comment.