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

Method __new__

lib/sqlalchemy/sql/elements.py:5316–5325  ·  view source on GitHub ↗
(cls, value: str, quote: Optional[bool])

Source from the content-addressed store, hash-verified

5314 return quoted_name(value, quote)
5315
5316 def __new__(cls, value: str, quote: Optional[bool]) -> Self:
5317 assert (
5318 value is not None
5319 ), "use quoted_name.construct() for None passthrough"
5320 if isinstance(value, cls) and (quote is None or value.quote == quote):
5321 return value
5322 self = super().__new__(cls, value)
5323
5324 self.quote = quote
5325 return self
5326
5327 def __reduce__(self):
5328 return quoted_name, (str(self), self.quote)

Callers 6

_cloneMethod · 0.45
columnsMethod · 0.45
_construct_rawMethod · 0.45
_construct_for_listMethod · 0.45
_construct_rawMethod · 0.45
__new__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected