MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / token

Method token

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

Source from the content-addressed store, hash-verified

393 is_root: bool
394
395 def token(self, token: _StrPathToken) -> TokenRegistry:
396 if token not in PathToken._intern:
397 raise exc.ArgumentError(f"invalid token: {token}")
398 elif token.endswith(f":{_WILDCARD_TOKEN}"):
399 return TokenRegistry(self, token)
400 else:
401 return TokenRegistry(self.root, token)
402
403
404class RootRegistry(CreatesToken):

Callers 5

_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 3

test_eq_non_pathMethod · 0.64