MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / token

Method token

lib/sqlalchemy/orm/path_registry.py:361–367  ·  view source on GitHub ↗
(self, token: _StrPathToken)

Source from the content-addressed store, hash-verified

359 is_root: bool
360
361 def token(self, token: _StrPathToken) -> _TokenRegistry:
362 if token.endswith(f":{_WILDCARD_TOKEN}"):
363 return _TokenRegistry(self, token)
364 elif token.endswith(f":{_DEFAULT_TOKEN}"):
365 return _TokenRegistry(self.root, token)
366 else:
367 raise exc.ArgumentError(f"invalid token: {token}")
368
369
370class RootRegistry(_CreatesToken):

Callers 3

_apply_to_parentMethod · 0.80
_init_pathMethod · 0.80
test_eq_non_pathMethod · 0.80

Calls 2

_TokenRegistryClass · 0.85
endswithMethod · 0.45

Tested by 1

test_eq_non_pathMethod · 0.64