MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __new__

Method __new__

lib/sqlalchemy/util/langhelpers.py:1868–1876  ·  view source on GitHub ↗
(
        cls, value: str, num: int, args: Sequence[Any]
    )

Source from the content-addressed store, hash-verified

1866 _hash: int
1867
1868 def __new__(
1869 cls, value: str, num: int, args: Sequence[Any]
1870 ) -> _hash_limit_string:
1871 interpolated = (value % args) + (
1872 " (this warning may be suppressed after %d occurrences)" % num
1873 )
1874 self = super().__new__(cls, interpolated)
1875 self._hash = hash("%s_%d" % (value, hash(interpolated) % num))
1876 return self
1877
1878 def __hash__(self) -> int:
1879 return self._hash

Callers

nothing calls this directly

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected