File: associationproxy.pyi

package info (click to toggle)
typeshed 0.0~git20221107.4f381af-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,036 kB
  • sloc: python: 3,216; sh: 62; makefile: 13
file content (199 lines) | stat: -rw-r--r-- 6,504 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
from typing import Any

from ..orm import interfaces
from ..sql.operators import ColumnOperators
from ..util import memoized_property

def association_proxy(target_collection, attr, **kw): ...

ASSOCIATION_PROXY: Any

class AssociationProxy(interfaces.InspectionAttrInfo):
    is_attribute: bool
    extension_type: Any
    target_collection: Any
    value_attr: Any
    creator: Any
    getset_factory: Any
    proxy_factory: Any
    proxy_bulk_set: Any
    cascade_scalar_deletes: Any
    key: Any
    info: Any
    def __init__(
        self,
        target_collection,
        attr,
        creator: Any | None = ...,
        getset_factory: Any | None = ...,
        proxy_factory: Any | None = ...,
        proxy_bulk_set: Any | None = ...,
        info: Any | None = ...,
        cascade_scalar_deletes: bool = ...,
    ) -> None: ...
    def __get__(self, obj, class_): ...
    def __set__(self, obj, values): ...
    def __delete__(self, obj): ...
    def for_class(self, class_, obj: Any | None = ...): ...

class AssociationProxyInstance:
    parent: Any
    key: Any
    owning_class: Any
    target_collection: Any
    collection_class: Any
    target_class: Any
    value_attr: Any
    def __init__(self, parent, owning_class, target_class, value_attr) -> None: ...
    @classmethod
    def for_proxy(cls, parent, owning_class, parent_instance): ...
    def __clause_element__(self) -> None: ...
    @property
    def remote_attr(self): ...
    @property
    def local_attr(self): ...
    @property
    def attr(self): ...
    @memoized_property
    def scalar(self): ...
    @property
    def info(self): ...
    def get(self, obj): ...
    def set(self, obj, values) -> None: ...
    def delete(self, obj) -> None: ...
    def any(self, criterion: Any | None = ..., **kwargs): ...
    def has(self, criterion: Any | None = ..., **kwargs): ...

class AmbiguousAssociationProxyInstance(AssociationProxyInstance):
    def get(self, obj): ...
    def __eq__(self, obj): ...
    def __ne__(self, obj): ...
    def any(self, criterion: Any | None = ..., **kwargs) -> None: ...
    def has(self, criterion: Any | None = ..., **kwargs) -> None: ...

class ObjectAssociationProxyInstance(AssociationProxyInstance):
    def contains(self, obj): ...
    def __eq__(self, obj): ...
    def __ne__(self, obj): ...

class ColumnAssociationProxyInstance(ColumnOperators[Any], AssociationProxyInstance):
    def __eq__(self, other) -> ColumnOperators[Any]: ...  # type: ignore[override]
    def operate(self, op, *other, **kwargs): ...

class _lazy_collection:
    parent: Any
    target: Any
    def __init__(self, obj, target) -> None: ...
    def __call__(self): ...

class _AssociationCollection:
    lazy_collection: Any
    creator: Any
    getter: Any
    setter: Any
    parent: Any
    def __init__(self, lazy_collection, creator, getter, setter, parent) -> None: ...
    @property
    def col(self): ...
    def __len__(self): ...
    def __bool__(self): ...
    __nonzero__: Any

class _AssociationList(_AssociationCollection):
    def __getitem__(self, index): ...
    def __setitem__(self, index, value) -> None: ...
    def __delitem__(self, index) -> None: ...
    def __contains__(self, value): ...
    def __getslice__(self, start, end): ...
    def __setslice__(self, start, end, values) -> None: ...
    def __delslice__(self, start, end) -> None: ...
    def __iter__(self): ...
    def append(self, value) -> None: ...
    def count(self, value): ...
    def extend(self, values) -> None: ...
    def insert(self, index, value) -> None: ...
    def pop(self, index: int = ...): ...
    def remove(self, value) -> None: ...
    def reverse(self) -> None: ...
    def sort(self) -> None: ...
    def clear(self) -> None: ...
    def __eq__(self, other): ...
    def __ne__(self, other): ...
    def __lt__(self, other): ...
    def __le__(self, other): ...
    def __gt__(self, other): ...
    def __ge__(self, other): ...
    def __cmp__(self, other): ...
    def __add__(self, iterable): ...
    def __radd__(self, iterable): ...
    def __mul__(self, n): ...
    __rmul__: Any
    def __iadd__(self, iterable): ...
    def __imul__(self, n): ...
    def index(self, item, *args): ...
    def copy(self): ...
    def __hash__(self): ...

class _AssociationDict(_AssociationCollection):
    def __getitem__(self, key): ...
    def __setitem__(self, key, value) -> None: ...
    def __delitem__(self, key) -> None: ...
    def __contains__(self, key): ...
    def has_key(self, key): ...
    def __iter__(self): ...
    def clear(self) -> None: ...
    def __eq__(self, other): ...
    def __ne__(self, other): ...
    def __lt__(self, other): ...
    def __le__(self, other): ...
    def __gt__(self, other): ...
    def __ge__(self, other): ...
    def __cmp__(self, other): ...
    def get(self, key, default: Any | None = ...): ...
    def setdefault(self, key, default: Any | None = ...): ...
    def keys(self): ...
    def items(self): ...
    def values(self): ...
    def pop(self, key, default=...): ...
    def popitem(self): ...
    def update(self, *a, **kw) -> None: ...
    def copy(self): ...
    def __hash__(self): ...

class _AssociationSet(_AssociationCollection):
    def __len__(self): ...
    def __bool__(self): ...
    __nonzero__: Any
    def __contains__(self, value): ...
    def __iter__(self): ...
    def add(self, value) -> None: ...
    def discard(self, value) -> None: ...
    def remove(self, value) -> None: ...
    def pop(self): ...
    def update(self, other) -> None: ...
    def __ior__(self, other): ...  # type: ignore[misc]
    def union(self, other): ...
    __or__: Any
    def difference(self, other): ...
    __sub__: Any
    def difference_update(self, other) -> None: ...
    def __isub__(self, other): ...  # type: ignore[misc]
    def intersection(self, other): ...
    __and__: Any
    def intersection_update(self, other) -> None: ...
    def __iand__(self, other): ...  # type: ignore[misc]
    def symmetric_difference(self, other): ...
    __xor__: Any
    def symmetric_difference_update(self, other) -> None: ...
    def __ixor__(self, other): ...  # type: ignore[misc]
    def issubset(self, other): ...
    def issuperset(self, other): ...
    def clear(self) -> None: ...
    def copy(self): ...
    def __eq__(self, other): ...
    def __ne__(self, other): ...
    def __lt__(self, other): ...
    def __le__(self, other): ...
    def __gt__(self, other): ...
    def __ge__(self, other): ...
    def __hash__(self): ...