33# Distributed under the terms of the Modified BSD License.
44
55from contextvars import Context , ContextVar , copy_context
6- from typing import Any , Dict , List
6+ from typing import Any
77
88
99class CallContext :
@@ -22,7 +22,7 @@ class CallContext:
2222 # easier management over maintaining a set of ContextVar instances, since the Context is a
2323 # map of ContextVar instances to their values, and the "name" is no longer a lookup key.
2424 _NAME_VALUE_MAP = "_name_value_map"
25- _name_value_map : ContextVar [Dict [str , Any ]] = ContextVar (_NAME_VALUE_MAP )
25+ _name_value_map : ContextVar [dict [str , Any ]] = ContextVar (_NAME_VALUE_MAP )
2626
2727 @classmethod
2828 def get (cls , name : str ) -> Any :
@@ -65,7 +65,7 @@ def set(cls, name: str, value: Any) -> None:
6565 name_value_map [name ] = value
6666
6767 @classmethod
68- def context_variable_names (cls ) -> List [str ]:
68+ def context_variable_names (cls ) -> list [str ]:
6969 """Returns a list of variable names set for this call context.
7070
7171 Returns
@@ -77,7 +77,7 @@ def context_variable_names(cls) -> List[str]:
7777 return list (name_value_map .keys ())
7878
7979 @classmethod
80- def _get_map (cls ) -> Dict [str , Any ]:
80+ def _get_map (cls ) -> dict [str , Any ]:
8181 """Get the map of names to their values from the _NAME_VALUE_MAP context var.
8282
8383 If the map does not exist in the current context, an empty map is created and returned.
0 commit comments