MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / _DefaultPlaceholder

Class _DefaultPlaceholder

sqlmodel/default.py:4–19  ·  view source on GitHub ↗

You shouldn't use this class directly. It's used internally to recognize when a default value has been overwritten, even if the overridden default value was truthy.

Source from the content-addressed store, hash-verified

2
3
4class _DefaultPlaceholder:
5 """
6 You shouldn't use this class directly.
7
8 It's used internally to recognize when a default value has been overwritten, even
9 if the overridden default value was truthy.
10 """
11
12 def __init__(self, value: Any):
13 self.value = value
14
15 def __bool__(self) -> bool:
16 return bool(self.value)
17
18 def __eq__(self, o: object) -> bool:
19 return isinstance(o, _DefaultPlaceholder) and o.value == self.value
20
21
22_TDefaultType = TypeVar("_TDefaultType")

Callers 1

DefaultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…