Skip to content

Commit

Permalink
type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mcucchi9 committed Jan 28, 2025
1 parent 7139962 commit da1ae20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cads_processing_api_service/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import functools
import traceback
from typing import Any, Callable

import attrs
import fastapi
Expand Down Expand Up @@ -64,9 +65,9 @@ class RateLimitExceeded(ogc_api_processes_fastapi.exceptions.OGCAPIException):
retry_after: int = 0


def exception_logger(f):
def exception_logger(f: Callable[..., Any]) -> Callable[..., Any]:
@functools.wraps(f)
def wrapper(*args, **kwargs):
def wrapper(*args: Any, **kwargs: Any) -> Any:
try:
res = f(*args, **kwargs)
except requests.exceptions.ReadTimeout:
Expand Down

0 comments on commit da1ae20

Please sign in to comment.