A tuple of globals and locals to be used during annotations evaluation. This datastructure is defined as a named tuple so that it can easily be unpacked: ```python {lint="skip" test="skip"} def eval_type(typ: type[Any], ns: NamespacesTuple) -> None: return eval(typ, *ns) ``
| 28 | |
| 29 | |
| 30 | class NamespacesTuple(NamedTuple): |
| 31 | """A tuple of globals and locals to be used during annotations evaluation. |
| 32 | |
| 33 | This datastructure is defined as a named tuple so that it can easily be unpacked: |
| 34 | |
| 35 | ```python {lint="skip" test="skip"} |
| 36 | def eval_type(typ: type[Any], ns: NamespacesTuple) -> None: |
| 37 | return eval(typ, *ns) |
| 38 | ``` |
| 39 | """ |
| 40 | |
| 41 | globals: GlobalsNamespace |
| 42 | """The namespace to be used as the `globals` argument during annotations evaluation.""" |
| 43 | |
| 44 | locals: MappingNamespace |
| 45 | """The namespace to be used as the `locals` argument during annotations evaluation.""" |
| 46 | |
| 47 | |
| 48 | def get_module_ns_of(obj: Any) -> dict[str, Any]: |
no outgoing calls
no test coverage detected