File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1010from typing import IO
1111from typing import List
1212from typing import Optional
13+ from typing import Type
14+ from typing import TypeVar
1315from typing import Union
1416
1517from baseplate import RequestContext
@@ -64,6 +66,7 @@ class DeciderContext:
6466 bucketing, targeting, and overrides.
6567 :code:`DeciderContext()` is populated in :code:`make_object_for_context()`.
6668 """
69+ T = TypeVar ("T" )
6770
6871 def __init__ (
6972 self ,
@@ -819,8 +822,8 @@ def _get_dynamic_config_value(
819822 self ,
820823 feature_name : str ,
821824 default : Any ,
822- dc_type : Any ,
823- ) -> Any :
825+ dc_type : Type [ T ] ,
826+ ) -> T :
824827 if self ._internal is None :
825828 logger .error ("rs_decider is None--did not initialize." )
826829 return default
@@ -840,7 +843,7 @@ def _get_dynamic_config_value(
840843 return default
841844
842845 try :
843- return dc_type (value )
846+ return dc_type (value ) # type: ignore [call-arg]
844847 except TypeError :
845848 return default
846849
You can’t perform that action at this time.
0 commit comments