Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Oct 17, 2024
1 parent 4796366 commit e20a158
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/cachier/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ def _update_with_defaults(

def set_default_params(**params: Mapping) -> None:
"""Configure default parameters applicable to all memoized functions."""
# This function is kept for backwards compatibility with desperation warning
# It is kept for backwards compatibility with desperation warning
import warnings

warnings.warn(
"Called `set_default_params` is deprecated and will be removed in a future version. "
"Please use `set_global_params` instead.",
"Called `set_default_params` is deprecated and will be removed."
" Please use `set_global_params` instead.",
DeprecationWarning,
stacklevel=2,
)
set_global_params(**params)

Expand Down Expand Up @@ -92,13 +93,14 @@ def set_global_params(**params: Mapping) -> None:

def get_default_params() -> Params:
"""Get current set of default parameters."""
# This function is kept for backwards compatibility with desperation warning
# It is kept for backwards compatibility with desperation warning
import warnings

warnings.warn(
"Called `get_default_params` is deprecated and will be removed in a future version. "
"Please use `get_global_params` instead.",
"Called `get_default_params` is deprecated and will be removed."
" Please use `get_global_params` instead.",
DeprecationWarning,
stacklevel=2,
)
return get_global_params()

Expand Down

0 comments on commit e20a158

Please sign in to comment.