Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type annotations for set_global_params and set_default_params #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/cachier/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import pickle
import threading
from collections.abc import Mapping
from dataclasses import dataclass, replace
from datetime import datetime, timedelta
from typing import Any, Optional, Union
Expand Down Expand Up @@ -65,7 +64,7 @@ def _update_with_defaults(
return param


def set_default_params(**params: Mapping) -> None:
def set_default_params(**params: Any) -> None:
"""Configure default parameters applicable to all memoized functions."""
# It is kept for backwards compatibility with desperation warning
import warnings
Expand All @@ -79,7 +78,7 @@ def set_default_params(**params: Mapping) -> None:
set_global_params(**params)


def set_global_params(**params: Mapping) -> None:
def set_global_params(**params: Any) -> None:
"""Configure global parameters applicable to all memoized functions.

This function takes the same keyword parameters as the ones defined in the
Expand Down