11import logging
22from collections .abc import Callable , Iterator
3- from typing import Any , TypeVar
3+ from typing import TypeVar
4+ from typing_extensions import ParamSpec
45
56logger : logging .Logger
67
7- _F = TypeVar ("_F" , bound = Callable [..., Any ])
8+ _P = ParamSpec ("_P" )
9+ _R = TypeVar ("_R" )
810
911class Data :
1012 def __init__ (self , ** fields : str ) -> None : ...
@@ -16,7 +18,7 @@ class Data:
1618class Country (Data ): ...
1719class Subdivision (Data ): ...
1820
19- def lazy_load (f : _F ) -> _F : ...
21+ def lazy_load (f : Callable [ _P , _R ] ) -> Callable [ _P , _R ] : ...
2022
2123class Database :
2224 data_class : type | str
@@ -32,12 +34,12 @@ class Database:
3234 @lazy_load
3335 def add_entry (self , ** kw : str ) -> None : ...
3436 @lazy_load
35- def remove_entry (self , ** kw : Any ) -> None : ...
37+ def remove_entry (self , ** kw : str ) -> None : ...
3638 @lazy_load
3739 def __iter__ (self ) -> Iterator [Data ]: ...
3840 @lazy_load
3941 def __len__ (self ) -> int : ...
4042 @lazy_load
41- def get (self , * , default : Data | None = ..., ** kw : Any ) -> Data | None : ...
43+ def get (self , * , default : Data | None = ..., ** kw : str ) -> Data | None : ...
4244 @lazy_load
4345 def lookup (self , value : str ) -> Data : ...
0 commit comments