MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __missing__

Method __missing__

lib/sqlalchemy/sql/_util_cy.py:58–69  ·  view source on GitHub ↗
(self, key: str, /)

Source from the content-addressed store, hash-verified

56 """
57
58 def __missing__(self, key: str, /) -> str:
59 derived: str
60 value: str
61 self_dict: dict = self # type: ignore[type-arg]
62
63 derived = key.split(" ", 1)[1]
64
65 anonymous_counter: int = self_dict.get(derived, 1)
66 self_dict[derived] = anonymous_counter + 1
67 value = f"{derived}_{anonymous_counter}"
68 self_dict[key] = value
69 return value
70
71
72_AM_KEY = Union[int, str, "CacheConst"]

Callers

nothing calls this directly

Calls 2

splitMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected