MCPcopy Create free account
hub / github.com/ipython/traitlets / _resolve_string

Method _resolve_string

traitlets/traitlets.py:2357–2363  ·  view source on GitHub ↗

Find the specified class name by looking for it in the module in which our this_class attribute was defined.

(self, string: str)

Source from the content-addressed store, hash-verified

2355 """
2356
2357 def _resolve_string(self, string: str) -> t.Any:
2358 """
2359 Find the specified class name by looking for it in the module in which
2360 our this_class attribute was defined.
2361 """
2362 modname = self.this_class.__module__ # type:ignore[attr-defined]
2363 return import_item(".".join([modname, string]))
2364
2365
2366class ForwardDeclaredType(ForwardDeclaredMixin, Type[G, S]):

Callers

nothing calls this directly

Calls 1

import_itemFunction · 0.85

Tested by

no test coverage detected