Skip to content

Commit

Permalink
clean: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Sep 16, 2024
1 parent c1b7f98 commit 2dc5753
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dooit/ui/widgets/trees/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
if TYPE_CHECKING:
from .model_tree import ModelTree

ModelTreeFunc = Callable[..., Any]


def fix_highlight(func: "ModelTreeFunc") -> "ModelTreeFunc":
def fix_highlight(func: Callable) -> Callable:

def wrapper(self: "ModelTree", *args, **kwargs) -> Any:
highlighted_id = self.node.id
Expand All @@ -25,7 +23,7 @@ def wrapper(self: "ModelTree", *args, **kwargs) -> Any:
return wrapper


def refresh_tree(func: "ModelTreeFunc") -> "ModelTreeFunc":
def refresh_tree(func: Callable) -> Callable:

def wrapper(self: "ModelTree", *args, **kwargs) -> Any:
func(self, *args, **kwargs)
Expand Down

0 comments on commit 2dc5753

Please sign in to comment.