Skip to content

Commit

Permalink
black code
Browse files Browse the repository at this point in the history
  • Loading branch information
dotX12 committed Feb 17, 2024
1 parent 16a7807 commit 6020fdd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions shazamio/deprecated/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ def deprecated(reason: str) -> Callable[[F], F]:
def decorator(func: F) -> F:
@functools.wraps(func)
def new_func(*args: Any, **kwargs: Any) -> Any:
warnings.simplefilter(
"always", DeprecationWarning
)
warnings.simplefilter("always", DeprecationWarning)
warnings.warn(
f"Call to deprecated function {func.__name__}. {reason}",
category=DeprecationWarning,
stacklevel=2,
)
warnings.simplefilter(
"default", DeprecationWarning
)
warnings.simplefilter("default", DeprecationWarning)
return func(*args, **kwargs)

return cast(F, new_func)
Expand Down

0 comments on commit 6020fdd

Please sign in to comment.