Skip to content

Commit

Permalink
Fix type annotation of errors in wrap_errors
Browse files Browse the repository at this point in the history
original typing is List[Exception], which is not the type of Exception class such as [AssertionError]. should be fixed as List[Type[Exception]].
  • Loading branch information
laazy authored Jul 9, 2024
1 parent 80f71e5 commit 9ef9a62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/argh/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Command decorators
~~~~~~~~~~~~~~~~~~
"""
from typing import Callable, List, Optional
from typing import Callable, List, Optional, Type

from argh.constants import (
ATTR_ALIASES,
Expand Down Expand Up @@ -161,7 +161,7 @@ def wrapper(func: Callable) -> Callable:


def wrap_errors(
errors: Optional[List[Exception]] = None,
errors: Optional[List[Type[Exception]]] = None,
processor: Optional[Callable] = None,
*args,
) -> Callable:
Expand Down

0 comments on commit 9ef9a62

Please sign in to comment.