oldaplib 0.3.8__py3-none-any.whl → 0.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -80,7 +80,7 @@ class ObservableSet(Notify):
|
|
|
80
80
|
def __str__(self) -> str:
|
|
81
81
|
return str(self._setdata)
|
|
82
82
|
|
|
83
|
-
def __eq__(self, other: Iterable) -> bool:
|
|
83
|
+
def __eq__(self, other: Iterable[Any]) -> bool:
|
|
84
84
|
if isinstance(other, ObservableSet):
|
|
85
85
|
return self._setdata == other._setdata
|
|
86
86
|
elif isinstance(other, set):
|
|
@@ -90,7 +90,7 @@ class ObservableSet(Notify):
|
|
|
90
90
|
else:
|
|
91
91
|
raise OldapErrorNotImplemented(f'Set.__eq__() not implemented for {type(other).__name__}')
|
|
92
92
|
|
|
93
|
-
def __or__(self, other: Iterable) -> Self:
|
|
93
|
+
def __or__(self, other: Iterable[Any]) -> Self:
|
|
94
94
|
if isinstance(other, ObservableSet):
|
|
95
95
|
return ObservableSet(self._setdata.__or__(other._setdata), self._notifier, self._notify_data)
|
|
96
96
|
elif isinstance(other, set):
|
|
@@ -100,25 +100,24 @@ class ObservableSet(Notify):
|
|
|
100
100
|
else:
|
|
101
101
|
raise OldapErrorNotImplemented(f'Set.__or__() not implemented for {type(other).__name__}')
|
|
102
102
|
|
|
103
|
-
def __ror__(self, other:
|
|
104
|
-
|
|
103
|
+
def __ror__(self, other: Iterable[Any]) -> Self:
|
|
104
|
+
return ObservableSet(set(other).__or__(self._setdata), self._notifier, self._notify_data)
|
|
105
|
+
|
|
106
|
+
def __rsub__(self, other: Iterable[Any]) -> Self:
|
|
107
|
+
return ObservableSet(set(other).__sub__(self._setdata), self._notifier, self._notify_data)
|
|
105
108
|
|
|
106
|
-
def __ior__(self, other: Iterable) -> Self:
|
|
109
|
+
def __ior__(self, other: Iterable[Any]) -> Self:
|
|
107
110
|
tmp_copy = deepcopy(self)
|
|
108
111
|
if isinstance(other, ObservableSet):
|
|
109
112
|
self._setdata.__ior__(other._setdata)
|
|
110
|
-
elif isinstance(other, set):
|
|
111
|
-
self._setdata.__ior__(other)
|
|
112
|
-
elif isinstance(other, Iterable):
|
|
113
|
-
return ObservableSet(self._setdata.__ior__(set(other)), self._notifier, self._notify_data)
|
|
114
113
|
else:
|
|
115
|
-
|
|
114
|
+
self._setdata.__ior__(set(other))
|
|
116
115
|
if not self._old_value:
|
|
117
116
|
self._old_value = tmp_copy
|
|
118
117
|
self.notify()
|
|
119
118
|
return self
|
|
120
119
|
|
|
121
|
-
def __and__(self, other: Iterable) -> Self:
|
|
120
|
+
def __and__(self, other: Iterable[Any]) -> Self:
|
|
122
121
|
if isinstance(other, ObservableSet):
|
|
123
122
|
return ObservableSet(self._setdata.__and__(other._setdata), self._notifier, self._notify_data)
|
|
124
123
|
elif isinstance(other, set):
|
|
@@ -128,7 +127,7 @@ class ObservableSet(Notify):
|
|
|
128
127
|
else:
|
|
129
128
|
raise OldapErrorNotImplemented(f'Set.__and__() not implemented for {type(other).__name__}')
|
|
130
129
|
|
|
131
|
-
def __iand__(self, other: Iterable) -> Self:
|
|
130
|
+
def __iand__(self, other: Iterable[Any]) -> Self:
|
|
132
131
|
tmp_copy = deepcopy(self)
|
|
133
132
|
if isinstance(other, ObservableSet):
|
|
134
133
|
self._setdata.__iand__(other._setdata)
|
|
@@ -146,7 +145,7 @@ class ObservableSet(Notify):
|
|
|
146
145
|
def __rsub__(self, other: Self) -> Self:
|
|
147
146
|
pass
|
|
148
147
|
|
|
149
|
-
def __sub__(self, other: Iterable) -> Self:
|
|
148
|
+
def __sub__(self, other: Iterable[Any]) -> Self:
|
|
150
149
|
if isinstance(other, ObservableSet):
|
|
151
150
|
return ObservableSet(self._setdata.__sub__(other._setdata), self.notify, self._notify_data)
|
|
152
151
|
elif isinstance(other, set):
|
|
@@ -156,7 +155,7 @@ class ObservableSet(Notify):
|
|
|
156
155
|
else:
|
|
157
156
|
raise OldapErrorNotImplemented(f'Set.__sub__() not implemented for {type(other).__name__}')
|
|
158
157
|
|
|
159
|
-
def __isub__(self, other: Iterable) -> Self:
|
|
158
|
+
def __isub__(self, other: Iterable[Any]) -> Self:
|
|
160
159
|
tmp_copy = deepcopy(self)
|
|
161
160
|
if isinstance(other, ObservableSet):
|
|
162
161
|
self._setdata.__isub__(other._setdata)
|
|
@@ -171,34 +170,45 @@ class ObservableSet(Notify):
|
|
|
171
170
|
self.notify()
|
|
172
171
|
return self
|
|
173
172
|
|
|
174
|
-
|
|
173
|
+
@classmethod
|
|
174
|
+
def coerce(cls, value: Iterable[Any], *, notifier=None, notify_data=None) -> "ObservableSet":
|
|
175
|
+
return value if isinstance(value, cls) else cls(value, notifier=notifier, notify_data=notify_data)
|
|
176
|
+
|
|
177
|
+
def update(self, items: Iterable[Any]):
|
|
175
178
|
tmp_copy = deepcopy(self)
|
|
176
179
|
self._setdata.update(items)
|
|
177
180
|
if not self._old_value:
|
|
178
181
|
self._old_value = tmp_copy
|
|
179
182
|
self.notify()
|
|
180
183
|
|
|
181
|
-
def intersection_update(self, items: Iterable):
|
|
184
|
+
def intersection_update(self, items: Iterable[Any]):
|
|
182
185
|
tmp_copy = deepcopy(self)
|
|
183
186
|
self._setdata.intersection_update(items)
|
|
184
187
|
if not self._old_value:
|
|
185
188
|
self._old_value = tmp_copy
|
|
186
189
|
self.notify()
|
|
187
190
|
|
|
188
|
-
def difference_update(self, items: Iterable):
|
|
191
|
+
def difference_update(self, items: Iterable[Any]):
|
|
189
192
|
tmp_copy = deepcopy(self)
|
|
190
193
|
self._setdata.difference_update(items)
|
|
191
194
|
if not self._old_value:
|
|
192
195
|
self._old_value = tmp_copy
|
|
193
196
|
self.notify()
|
|
194
197
|
|
|
195
|
-
def symmetric_difference_update(self, items: Iterable):
|
|
198
|
+
def symmetric_difference_update(self, items: Iterable[Any]):
|
|
196
199
|
tmp_copy = deepcopy(self)
|
|
197
200
|
self._setdata.symmetric_difference_update(items)
|
|
198
201
|
if not self._old_value:
|
|
199
202
|
self._old_value = tmp_copy
|
|
200
203
|
self.notify()
|
|
201
204
|
|
|
205
|
+
def replace(self, items: Iterable[Any]) -> None:
|
|
206
|
+
tmp_copy = deepcopy(self)
|
|
207
|
+
self._setdata = set(items)
|
|
208
|
+
if not self._old_value:
|
|
209
|
+
self._old_value = tmp_copy
|
|
210
|
+
self.notify()
|
|
211
|
+
|
|
202
212
|
def add(self, item: Any) -> None:
|
|
203
213
|
tmp_copy = deepcopy(self)
|
|
204
214
|
self._setdata.add(item)
|
oldaplib/src/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.3.
|
|
1
|
+
__version__ = "0.3.9"
|
|
@@ -48,7 +48,7 @@ oldaplib/src/helpers/json_encoder.py,sha256=c78h9uf58zfLaK8X7S1KCK4otY3iEltGnPBy
|
|
|
48
48
|
oldaplib/src/helpers/langstring.py,sha256=KfyYisMKEYstv-CUPlKkjMg9fbTjrOV3IDn2HOUfdtY,30350
|
|
49
49
|
oldaplib/src/helpers/numeric.py,sha256=swRKU51zbwss9UDGTC6FzhTTPK_BVfy5On0KCK-zZnQ,966
|
|
50
50
|
oldaplib/src/helpers/observable_dict.py,sha256=w_I4fG8tKBibimcmSxeKgvDF-zy2aHSBUluXIBeNCHE,3287
|
|
51
|
-
oldaplib/src/helpers/observable_set.py,sha256=
|
|
51
|
+
oldaplib/src/helpers/observable_set.py,sha256=IWkcgMBh5P-J3TkLijyaLmvxLqmAPdp-ayNkJKD_qf0,14427
|
|
52
52
|
oldaplib/src/helpers/oldaperror.py,sha256=2gKgV8FYiEjbcox1KN1PlOIPY4KclxVTnCIOQ6Ivvc0,1321
|
|
53
53
|
oldaplib/src/helpers/query_processor.py,sha256=1RJnQ9u6BS58xK0PcTbffzF2W-_K42kw37Vbh2HO5sA,10369
|
|
54
54
|
oldaplib/src/helpers/semantic_version.py,sha256=HLFQO2CPVDz_GKZaFCjR5q_G-aSLQ2XYohCA2tCU9go,3218
|
|
@@ -70,7 +70,7 @@ oldaplib/src/propertyclass.py,sha256=pnaDsmyGKQnJaaOHXA0XyLcp4zn1b1vC9sLbjXls4lM
|
|
|
70
70
|
oldaplib/src/resourceclass.py,sha256=EIxyd7Z_w59wDxWLXCaLvhhvh5SjLEUWb8gqmZz8LLM,102046
|
|
71
71
|
oldaplib/src/user.py,sha256=Z4GXPRkaHXx3glUpPXQdFqYMxQPOuqayDwkTAE5RGjU,48820
|
|
72
72
|
oldaplib/src/userdataclass.py,sha256=FbZkcRt0pKbOeqsZ7HbpwoKE-XPWH2AqpHG1GcsrBPo,12364
|
|
73
|
-
oldaplib/src/version.py,sha256=
|
|
73
|
+
oldaplib/src/version.py,sha256=7YeBgSVj8ydF7tymPSFdq22NONiQoBjKL1iwcxp4TJo,21
|
|
74
74
|
oldaplib/src/xsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
oldaplib/src/xsd/floatingpoint.py,sha256=rDReKqh0mXyc4F5wslgTUxbeGf3-PGERyughj5_62YI,8852
|
|
76
76
|
oldaplib/src/xsd/iri.py,sha256=w1Dr0z-REi7yPe3GPGnyzGrLVMvLY03kEeK-AmZ9sxw,8383
|
|
@@ -157,6 +157,6 @@ oldaplib/testdata/source_type.yaml,sha256=dSihKikw3O-IlGf6anj5KWMoBYLaweLVF1Zojm
|
|
|
157
157
|
oldaplib/testdata/test_move_left_of_toL.yaml,sha256=2m1OSQrQFlsCQxeJrjzBAO74LMprNDo_HuyrYGsOeXI,787
|
|
158
158
|
oldaplib/testdata/testlist.yaml,sha256=AT11nXEG81Sfyb-tr1gQV0H_dZBrOCcFuHf7YtL8P2g,1994
|
|
159
159
|
oldaplib/testit.http,sha256=qW7mnr6aNLXFG6lQdLgyhXILOPN6qc5iFVZclLyVvkY,303
|
|
160
|
-
oldaplib-0.3.
|
|
161
|
-
oldaplib-0.3.
|
|
162
|
-
oldaplib-0.3.
|
|
160
|
+
oldaplib-0.3.9.dist-info/METADATA,sha256=ncha961sACYOwWBsWQKJAqOQBNl06LMs-FwdLm7neA8,2854
|
|
161
|
+
oldaplib-0.3.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
162
|
+
oldaplib-0.3.9.dist-info/RECORD,,
|
|
File without changes
|