python-datamodel 0.10.1__cp313-cp313-win32.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.
- datamodel/__init__.py +13 -0
- datamodel/abstract.py +383 -0
- datamodel/adaptive/__init__.py +0 -0
- datamodel/adaptive/models.py +598 -0
- datamodel/aliases/__init__.py +26 -0
- datamodel/base.py +180 -0
- datamodel/converters.c +43471 -0
- datamodel/converters.cp313-win32.pyd +0 -0
- datamodel/converters.html +17387 -0
- datamodel/converters.pyx +1489 -0
- datamodel/exceptions.c +13455 -0
- datamodel/exceptions.cp313-win32.pyd +0 -0
- datamodel/exceptions.html +1261 -0
- datamodel/exceptions.pxd +13 -0
- datamodel/exceptions.pyx +50 -0
- datamodel/fields.cp313-win32.pyd +0 -0
- datamodel/fields.cpp +17401 -0
- datamodel/fields.html +3912 -0
- datamodel/fields.pyx +309 -0
- datamodel/functions.cp313-win32.pyd +0 -0
- datamodel/functions.cpp +9068 -0
- datamodel/functions.html +1766 -0
- datamodel/functions.pxd +9 -0
- datamodel/functions.pyx +82 -0
- datamodel/jsonld/__init__.py +45 -0
- datamodel/jsonld/models.py +500 -0
- datamodel/libs/__init__.py +1 -0
- datamodel/libs/mapping.c +15067 -0
- datamodel/libs/mapping.cp313-win32.pyd +0 -0
- datamodel/libs/mapping.html +2618 -0
- datamodel/libs/mapping.pxd +11 -0
- datamodel/libs/mapping.pyx +135 -0
- datamodel/libs/mutables.py +127 -0
- datamodel/models.py +814 -0
- datamodel/parsers/__init__.py +0 -0
- datamodel/parsers/encoders.py +15 -0
- datamodel/parsers/json.cp313-win32.pyd +0 -0
- datamodel/parsers/json.cpp +17004 -0
- datamodel/parsers/json.html +3365 -0
- datamodel/parsers/json.pyx +250 -0
- datamodel/profiler.py +21 -0
- datamodel/py.typed +0 -0
- datamodel/rs_core/Cargo.toml +17 -0
- datamodel/rs_core/src/lib.rs +294 -0
- datamodel/rs_parsers/Cargo.toml +22 -0
- datamodel/rs_parsers/src/lib.rs +571 -0
- datamodel/rs_parsers.cp313-win32.pyd +0 -0
- datamodel/rs_validators/Cargo.toml +17 -0
- datamodel/rs_validators/src/lib.rs +0 -0
- datamodel/typedefs/__init__.py +9 -0
- datamodel/typedefs/singleton.c +9169 -0
- datamodel/typedefs/singleton.cp313-win32.pyd +0 -0
- datamodel/typedefs/singleton.html +629 -0
- datamodel/typedefs/singleton.pxd +9 -0
- datamodel/typedefs/singleton.pyx +24 -0
- datamodel/typedefs/types.c +11716 -0
- datamodel/typedefs/types.cp313-win32.pyd +0 -0
- datamodel/typedefs/types.html +732 -0
- datamodel/typedefs/types.pxd +11 -0
- datamodel/typedefs/types.pyx +39 -0
- datamodel/types.c +7165 -0
- datamodel/types.cp313-win32.pyd +0 -0
- datamodel/types.html +716 -0
- datamodel/types.pyx +100 -0
- datamodel/validation.cp313-win32.pyd +0 -0
- datamodel/validation.cpp +17085 -0
- datamodel/validation.html +4769 -0
- datamodel/validation.pyx +315 -0
- datamodel/version.py +13 -0
- examples/nn/examples.py +311 -0
- examples/nn/stores.py +151 -0
- examples/tests/sp_types.py +294 -0
- examples/tests/speed_dates.py +26 -0
- python_datamodel-0.10.1.dist-info/LICENSE +29 -0
- python_datamodel-0.10.1.dist-info/METADATA +320 -0
- python_datamodel-0.10.1.dist-info/RECORD +78 -0
- python_datamodel-0.10.1.dist-info/WHEEL +5 -0
- python_datamodel-0.10.1.dist-info/top_level.txt +7 -0
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!-- Generated by Cython 3.0.11 -->
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Cython: exceptions.pyx</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
body.cython { font-family: courier; font-size: 12; }
|
|
10
|
+
|
|
11
|
+
.cython.tag { }
|
|
12
|
+
.cython.line { color: #000000; margin: 0em }
|
|
13
|
+
.cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; }
|
|
14
|
+
|
|
15
|
+
.cython.line .run { background-color: #B0FFB0; }
|
|
16
|
+
.cython.line .mis { background-color: #FFB0B0; }
|
|
17
|
+
.cython.code.run { border-left: 8px solid #B0FFB0; }
|
|
18
|
+
.cython.code.mis { border-left: 8px solid #FFB0B0; }
|
|
19
|
+
|
|
20
|
+
.cython.code .py_c_api { color: red; }
|
|
21
|
+
.cython.code .py_macro_api { color: #FF7000; }
|
|
22
|
+
.cython.code .pyx_c_api { color: #FF3000; }
|
|
23
|
+
.cython.code .pyx_macro_api { color: #FF7000; }
|
|
24
|
+
.cython.code .refnanny { color: #FFA000; }
|
|
25
|
+
.cython.code .trace { color: #FFA000; }
|
|
26
|
+
.cython.code .error_goto { color: #FFA000; }
|
|
27
|
+
|
|
28
|
+
.cython.code .coerce { color: #008000; border: 1px dotted #008000 }
|
|
29
|
+
.cython.code .py_attr { color: #FF0000; font-weight: bold; }
|
|
30
|
+
.cython.code .c_attr { color: #0000FF; }
|
|
31
|
+
.cython.code .py_call { color: #FF0000; font-weight: bold; }
|
|
32
|
+
.cython.code .c_call { color: #0000FF; }
|
|
33
|
+
|
|
34
|
+
.cython.score-0 {background-color: #FFFFff;}
|
|
35
|
+
.cython.score-1 {background-color: #FFFFe7;}
|
|
36
|
+
.cython.score-2 {background-color: #FFFFd4;}
|
|
37
|
+
.cython.score-3 {background-color: #FFFFc4;}
|
|
38
|
+
.cython.score-4 {background-color: #FFFFb6;}
|
|
39
|
+
.cython.score-5 {background-color: #FFFFaa;}
|
|
40
|
+
.cython.score-6 {background-color: #FFFF9f;}
|
|
41
|
+
.cython.score-7 {background-color: #FFFF96;}
|
|
42
|
+
.cython.score-8 {background-color: #FFFF8d;}
|
|
43
|
+
.cython.score-9 {background-color: #FFFF86;}
|
|
44
|
+
.cython.score-10 {background-color: #FFFF7f;}
|
|
45
|
+
.cython.score-11 {background-color: #FFFF79;}
|
|
46
|
+
.cython.score-12 {background-color: #FFFF73;}
|
|
47
|
+
.cython.score-13 {background-color: #FFFF6e;}
|
|
48
|
+
.cython.score-14 {background-color: #FFFF6a;}
|
|
49
|
+
.cython.score-15 {background-color: #FFFF66;}
|
|
50
|
+
.cython.score-16 {background-color: #FFFF62;}
|
|
51
|
+
.cython.score-17 {background-color: #FFFF5e;}
|
|
52
|
+
.cython.score-18 {background-color: #FFFF5b;}
|
|
53
|
+
.cython.score-19 {background-color: #FFFF57;}
|
|
54
|
+
.cython.score-20 {background-color: #FFFF55;}
|
|
55
|
+
.cython.score-21 {background-color: #FFFF52;}
|
|
56
|
+
.cython.score-22 {background-color: #FFFF4f;}
|
|
57
|
+
.cython.score-23 {background-color: #FFFF4d;}
|
|
58
|
+
.cython.score-24 {background-color: #FFFF4b;}
|
|
59
|
+
.cython.score-25 {background-color: #FFFF48;}
|
|
60
|
+
.cython.score-26 {background-color: #FFFF46;}
|
|
61
|
+
.cython.score-27 {background-color: #FFFF44;}
|
|
62
|
+
.cython.score-28 {background-color: #FFFF43;}
|
|
63
|
+
.cython.score-29 {background-color: #FFFF41;}
|
|
64
|
+
.cython.score-30 {background-color: #FFFF3f;}
|
|
65
|
+
.cython.score-31 {background-color: #FFFF3e;}
|
|
66
|
+
.cython.score-32 {background-color: #FFFF3c;}
|
|
67
|
+
.cython.score-33 {background-color: #FFFF3b;}
|
|
68
|
+
.cython.score-34 {background-color: #FFFF39;}
|
|
69
|
+
.cython.score-35 {background-color: #FFFF38;}
|
|
70
|
+
.cython.score-36 {background-color: #FFFF37;}
|
|
71
|
+
.cython.score-37 {background-color: #FFFF36;}
|
|
72
|
+
.cython.score-38 {background-color: #FFFF35;}
|
|
73
|
+
.cython.score-39 {background-color: #FFFF34;}
|
|
74
|
+
.cython.score-40 {background-color: #FFFF33;}
|
|
75
|
+
.cython.score-41 {background-color: #FFFF32;}
|
|
76
|
+
.cython.score-42 {background-color: #FFFF31;}
|
|
77
|
+
.cython.score-43 {background-color: #FFFF30;}
|
|
78
|
+
.cython.score-44 {background-color: #FFFF2f;}
|
|
79
|
+
.cython.score-45 {background-color: #FFFF2e;}
|
|
80
|
+
.cython.score-46 {background-color: #FFFF2d;}
|
|
81
|
+
.cython.score-47 {background-color: #FFFF2c;}
|
|
82
|
+
.cython.score-48 {background-color: #FFFF2b;}
|
|
83
|
+
.cython.score-49 {background-color: #FFFF2b;}
|
|
84
|
+
.cython.score-50 {background-color: #FFFF2a;}
|
|
85
|
+
.cython.score-51 {background-color: #FFFF29;}
|
|
86
|
+
.cython.score-52 {background-color: #FFFF29;}
|
|
87
|
+
.cython.score-53 {background-color: #FFFF28;}
|
|
88
|
+
.cython.score-54 {background-color: #FFFF27;}
|
|
89
|
+
.cython.score-55 {background-color: #FFFF27;}
|
|
90
|
+
.cython.score-56 {background-color: #FFFF26;}
|
|
91
|
+
.cython.score-57 {background-color: #FFFF26;}
|
|
92
|
+
.cython.score-58 {background-color: #FFFF25;}
|
|
93
|
+
.cython.score-59 {background-color: #FFFF24;}
|
|
94
|
+
.cython.score-60 {background-color: #FFFF24;}
|
|
95
|
+
.cython.score-61 {background-color: #FFFF23;}
|
|
96
|
+
.cython.score-62 {background-color: #FFFF23;}
|
|
97
|
+
.cython.score-63 {background-color: #FFFF22;}
|
|
98
|
+
.cython.score-64 {background-color: #FFFF22;}
|
|
99
|
+
.cython.score-65 {background-color: #FFFF22;}
|
|
100
|
+
.cython.score-66 {background-color: #FFFF21;}
|
|
101
|
+
.cython.score-67 {background-color: #FFFF21;}
|
|
102
|
+
.cython.score-68 {background-color: #FFFF20;}
|
|
103
|
+
.cython.score-69 {background-color: #FFFF20;}
|
|
104
|
+
.cython.score-70 {background-color: #FFFF1f;}
|
|
105
|
+
.cython.score-71 {background-color: #FFFF1f;}
|
|
106
|
+
.cython.score-72 {background-color: #FFFF1f;}
|
|
107
|
+
.cython.score-73 {background-color: #FFFF1e;}
|
|
108
|
+
.cython.score-74 {background-color: #FFFF1e;}
|
|
109
|
+
.cython.score-75 {background-color: #FFFF1e;}
|
|
110
|
+
.cython.score-76 {background-color: #FFFF1d;}
|
|
111
|
+
.cython.score-77 {background-color: #FFFF1d;}
|
|
112
|
+
.cython.score-78 {background-color: #FFFF1c;}
|
|
113
|
+
.cython.score-79 {background-color: #FFFF1c;}
|
|
114
|
+
.cython.score-80 {background-color: #FFFF1c;}
|
|
115
|
+
.cython.score-81 {background-color: #FFFF1c;}
|
|
116
|
+
.cython.score-82 {background-color: #FFFF1b;}
|
|
117
|
+
.cython.score-83 {background-color: #FFFF1b;}
|
|
118
|
+
.cython.score-84 {background-color: #FFFF1b;}
|
|
119
|
+
.cython.score-85 {background-color: #FFFF1a;}
|
|
120
|
+
.cython.score-86 {background-color: #FFFF1a;}
|
|
121
|
+
.cython.score-87 {background-color: #FFFF1a;}
|
|
122
|
+
.cython.score-88 {background-color: #FFFF1a;}
|
|
123
|
+
.cython.score-89 {background-color: #FFFF19;}
|
|
124
|
+
.cython.score-90 {background-color: #FFFF19;}
|
|
125
|
+
.cython.score-91 {background-color: #FFFF19;}
|
|
126
|
+
.cython.score-92 {background-color: #FFFF19;}
|
|
127
|
+
.cython.score-93 {background-color: #FFFF18;}
|
|
128
|
+
.cython.score-94 {background-color: #FFFF18;}
|
|
129
|
+
.cython.score-95 {background-color: #FFFF18;}
|
|
130
|
+
.cython.score-96 {background-color: #FFFF18;}
|
|
131
|
+
.cython.score-97 {background-color: #FFFF17;}
|
|
132
|
+
.cython.score-98 {background-color: #FFFF17;}
|
|
133
|
+
.cython.score-99 {background-color: #FFFF17;}
|
|
134
|
+
.cython.score-100 {background-color: #FFFF17;}
|
|
135
|
+
.cython.score-101 {background-color: #FFFF16;}
|
|
136
|
+
.cython.score-102 {background-color: #FFFF16;}
|
|
137
|
+
.cython.score-103 {background-color: #FFFF16;}
|
|
138
|
+
.cython.score-104 {background-color: #FFFF16;}
|
|
139
|
+
.cython.score-105 {background-color: #FFFF16;}
|
|
140
|
+
.cython.score-106 {background-color: #FFFF15;}
|
|
141
|
+
.cython.score-107 {background-color: #FFFF15;}
|
|
142
|
+
.cython.score-108 {background-color: #FFFF15;}
|
|
143
|
+
.cython.score-109 {background-color: #FFFF15;}
|
|
144
|
+
.cython.score-110 {background-color: #FFFF15;}
|
|
145
|
+
.cython.score-111 {background-color: #FFFF15;}
|
|
146
|
+
.cython.score-112 {background-color: #FFFF14;}
|
|
147
|
+
.cython.score-113 {background-color: #FFFF14;}
|
|
148
|
+
.cython.score-114 {background-color: #FFFF14;}
|
|
149
|
+
.cython.score-115 {background-color: #FFFF14;}
|
|
150
|
+
.cython.score-116 {background-color: #FFFF14;}
|
|
151
|
+
.cython.score-117 {background-color: #FFFF14;}
|
|
152
|
+
.cython.score-118 {background-color: #FFFF13;}
|
|
153
|
+
.cython.score-119 {background-color: #FFFF13;}
|
|
154
|
+
.cython.score-120 {background-color: #FFFF13;}
|
|
155
|
+
.cython.score-121 {background-color: #FFFF13;}
|
|
156
|
+
.cython.score-122 {background-color: #FFFF13;}
|
|
157
|
+
.cython.score-123 {background-color: #FFFF13;}
|
|
158
|
+
.cython.score-124 {background-color: #FFFF13;}
|
|
159
|
+
.cython.score-125 {background-color: #FFFF12;}
|
|
160
|
+
.cython.score-126 {background-color: #FFFF12;}
|
|
161
|
+
.cython.score-127 {background-color: #FFFF12;}
|
|
162
|
+
.cython.score-128 {background-color: #FFFF12;}
|
|
163
|
+
.cython.score-129 {background-color: #FFFF12;}
|
|
164
|
+
.cython.score-130 {background-color: #FFFF12;}
|
|
165
|
+
.cython.score-131 {background-color: #FFFF12;}
|
|
166
|
+
.cython.score-132 {background-color: #FFFF11;}
|
|
167
|
+
.cython.score-133 {background-color: #FFFF11;}
|
|
168
|
+
.cython.score-134 {background-color: #FFFF11;}
|
|
169
|
+
.cython.score-135 {background-color: #FFFF11;}
|
|
170
|
+
.cython.score-136 {background-color: #FFFF11;}
|
|
171
|
+
.cython.score-137 {background-color: #FFFF11;}
|
|
172
|
+
.cython.score-138 {background-color: #FFFF11;}
|
|
173
|
+
.cython.score-139 {background-color: #FFFF11;}
|
|
174
|
+
.cython.score-140 {background-color: #FFFF11;}
|
|
175
|
+
.cython.score-141 {background-color: #FFFF10;}
|
|
176
|
+
.cython.score-142 {background-color: #FFFF10;}
|
|
177
|
+
.cython.score-143 {background-color: #FFFF10;}
|
|
178
|
+
.cython.score-144 {background-color: #FFFF10;}
|
|
179
|
+
.cython.score-145 {background-color: #FFFF10;}
|
|
180
|
+
.cython.score-146 {background-color: #FFFF10;}
|
|
181
|
+
.cython.score-147 {background-color: #FFFF10;}
|
|
182
|
+
.cython.score-148 {background-color: #FFFF10;}
|
|
183
|
+
.cython.score-149 {background-color: #FFFF10;}
|
|
184
|
+
.cython.score-150 {background-color: #FFFF0f;}
|
|
185
|
+
.cython.score-151 {background-color: #FFFF0f;}
|
|
186
|
+
.cython.score-152 {background-color: #FFFF0f;}
|
|
187
|
+
.cython.score-153 {background-color: #FFFF0f;}
|
|
188
|
+
.cython.score-154 {background-color: #FFFF0f;}
|
|
189
|
+
.cython.score-155 {background-color: #FFFF0f;}
|
|
190
|
+
.cython.score-156 {background-color: #FFFF0f;}
|
|
191
|
+
.cython.score-157 {background-color: #FFFF0f;}
|
|
192
|
+
.cython.score-158 {background-color: #FFFF0f;}
|
|
193
|
+
.cython.score-159 {background-color: #FFFF0f;}
|
|
194
|
+
.cython.score-160 {background-color: #FFFF0f;}
|
|
195
|
+
.cython.score-161 {background-color: #FFFF0e;}
|
|
196
|
+
.cython.score-162 {background-color: #FFFF0e;}
|
|
197
|
+
.cython.score-163 {background-color: #FFFF0e;}
|
|
198
|
+
.cython.score-164 {background-color: #FFFF0e;}
|
|
199
|
+
.cython.score-165 {background-color: #FFFF0e;}
|
|
200
|
+
.cython.score-166 {background-color: #FFFF0e;}
|
|
201
|
+
.cython.score-167 {background-color: #FFFF0e;}
|
|
202
|
+
.cython.score-168 {background-color: #FFFF0e;}
|
|
203
|
+
.cython.score-169 {background-color: #FFFF0e;}
|
|
204
|
+
.cython.score-170 {background-color: #FFFF0e;}
|
|
205
|
+
.cython.score-171 {background-color: #FFFF0e;}
|
|
206
|
+
.cython.score-172 {background-color: #FFFF0e;}
|
|
207
|
+
.cython.score-173 {background-color: #FFFF0d;}
|
|
208
|
+
.cython.score-174 {background-color: #FFFF0d;}
|
|
209
|
+
.cython.score-175 {background-color: #FFFF0d;}
|
|
210
|
+
.cython.score-176 {background-color: #FFFF0d;}
|
|
211
|
+
.cython.score-177 {background-color: #FFFF0d;}
|
|
212
|
+
.cython.score-178 {background-color: #FFFF0d;}
|
|
213
|
+
.cython.score-179 {background-color: #FFFF0d;}
|
|
214
|
+
.cython.score-180 {background-color: #FFFF0d;}
|
|
215
|
+
.cython.score-181 {background-color: #FFFF0d;}
|
|
216
|
+
.cython.score-182 {background-color: #FFFF0d;}
|
|
217
|
+
.cython.score-183 {background-color: #FFFF0d;}
|
|
218
|
+
.cython.score-184 {background-color: #FFFF0d;}
|
|
219
|
+
.cython.score-185 {background-color: #FFFF0d;}
|
|
220
|
+
.cython.score-186 {background-color: #FFFF0d;}
|
|
221
|
+
.cython.score-187 {background-color: #FFFF0c;}
|
|
222
|
+
.cython.score-188 {background-color: #FFFF0c;}
|
|
223
|
+
.cython.score-189 {background-color: #FFFF0c;}
|
|
224
|
+
.cython.score-190 {background-color: #FFFF0c;}
|
|
225
|
+
.cython.score-191 {background-color: #FFFF0c;}
|
|
226
|
+
.cython.score-192 {background-color: #FFFF0c;}
|
|
227
|
+
.cython.score-193 {background-color: #FFFF0c;}
|
|
228
|
+
.cython.score-194 {background-color: #FFFF0c;}
|
|
229
|
+
.cython.score-195 {background-color: #FFFF0c;}
|
|
230
|
+
.cython.score-196 {background-color: #FFFF0c;}
|
|
231
|
+
.cython.score-197 {background-color: #FFFF0c;}
|
|
232
|
+
.cython.score-198 {background-color: #FFFF0c;}
|
|
233
|
+
.cython.score-199 {background-color: #FFFF0c;}
|
|
234
|
+
.cython.score-200 {background-color: #FFFF0c;}
|
|
235
|
+
.cython.score-201 {background-color: #FFFF0c;}
|
|
236
|
+
.cython.score-202 {background-color: #FFFF0c;}
|
|
237
|
+
.cython.score-203 {background-color: #FFFF0b;}
|
|
238
|
+
.cython.score-204 {background-color: #FFFF0b;}
|
|
239
|
+
.cython.score-205 {background-color: #FFFF0b;}
|
|
240
|
+
.cython.score-206 {background-color: #FFFF0b;}
|
|
241
|
+
.cython.score-207 {background-color: #FFFF0b;}
|
|
242
|
+
.cython.score-208 {background-color: #FFFF0b;}
|
|
243
|
+
.cython.score-209 {background-color: #FFFF0b;}
|
|
244
|
+
.cython.score-210 {background-color: #FFFF0b;}
|
|
245
|
+
.cython.score-211 {background-color: #FFFF0b;}
|
|
246
|
+
.cython.score-212 {background-color: #FFFF0b;}
|
|
247
|
+
.cython.score-213 {background-color: #FFFF0b;}
|
|
248
|
+
.cython.score-214 {background-color: #FFFF0b;}
|
|
249
|
+
.cython.score-215 {background-color: #FFFF0b;}
|
|
250
|
+
.cython.score-216 {background-color: #FFFF0b;}
|
|
251
|
+
.cython.score-217 {background-color: #FFFF0b;}
|
|
252
|
+
.cython.score-218 {background-color: #FFFF0b;}
|
|
253
|
+
.cython.score-219 {background-color: #FFFF0b;}
|
|
254
|
+
.cython.score-220 {background-color: #FFFF0b;}
|
|
255
|
+
.cython.score-221 {background-color: #FFFF0b;}
|
|
256
|
+
.cython.score-222 {background-color: #FFFF0a;}
|
|
257
|
+
.cython.score-223 {background-color: #FFFF0a;}
|
|
258
|
+
.cython.score-224 {background-color: #FFFF0a;}
|
|
259
|
+
.cython.score-225 {background-color: #FFFF0a;}
|
|
260
|
+
.cython.score-226 {background-color: #FFFF0a;}
|
|
261
|
+
.cython.score-227 {background-color: #FFFF0a;}
|
|
262
|
+
.cython.score-228 {background-color: #FFFF0a;}
|
|
263
|
+
.cython.score-229 {background-color: #FFFF0a;}
|
|
264
|
+
.cython.score-230 {background-color: #FFFF0a;}
|
|
265
|
+
.cython.score-231 {background-color: #FFFF0a;}
|
|
266
|
+
.cython.score-232 {background-color: #FFFF0a;}
|
|
267
|
+
.cython.score-233 {background-color: #FFFF0a;}
|
|
268
|
+
.cython.score-234 {background-color: #FFFF0a;}
|
|
269
|
+
.cython.score-235 {background-color: #FFFF0a;}
|
|
270
|
+
.cython.score-236 {background-color: #FFFF0a;}
|
|
271
|
+
.cython.score-237 {background-color: #FFFF0a;}
|
|
272
|
+
.cython.score-238 {background-color: #FFFF0a;}
|
|
273
|
+
.cython.score-239 {background-color: #FFFF0a;}
|
|
274
|
+
.cython.score-240 {background-color: #FFFF0a;}
|
|
275
|
+
.cython.score-241 {background-color: #FFFF0a;}
|
|
276
|
+
.cython.score-242 {background-color: #FFFF0a;}
|
|
277
|
+
.cython.score-243 {background-color: #FFFF0a;}
|
|
278
|
+
.cython.score-244 {background-color: #FFFF0a;}
|
|
279
|
+
.cython.score-245 {background-color: #FFFF0a;}
|
|
280
|
+
.cython.score-246 {background-color: #FFFF09;}
|
|
281
|
+
.cython.score-247 {background-color: #FFFF09;}
|
|
282
|
+
.cython.score-248 {background-color: #FFFF09;}
|
|
283
|
+
.cython.score-249 {background-color: #FFFF09;}
|
|
284
|
+
.cython.score-250 {background-color: #FFFF09;}
|
|
285
|
+
.cython.score-251 {background-color: #FFFF09;}
|
|
286
|
+
.cython.score-252 {background-color: #FFFF09;}
|
|
287
|
+
.cython.score-253 {background-color: #FFFF09;}
|
|
288
|
+
.cython.score-254 {background-color: #FFFF09;}
|
|
289
|
+
</style>
|
|
290
|
+
</head>
|
|
291
|
+
<body class="cython">
|
|
292
|
+
<p><span style="border-bottom: solid 1px grey;">Generated by Cython 3.0.11</span></p>
|
|
293
|
+
<p>
|
|
294
|
+
<span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br />
|
|
295
|
+
Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it.
|
|
296
|
+
</p>
|
|
297
|
+
<p>Raw output: <a href="exceptions.c">exceptions.c</a></p>
|
|
298
|
+
<div class="cython"><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">01</span>: # cython: language_level=3, embedsignature=True, boundscheck=False, wraparound=True, initializedcheck=False</pre>
|
|
299
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
300
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
301
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
302
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
303
|
+
</pre><pre class="cython line score-0"> <span class="">02</span>: # Copyright (C) 2018-present Jesus Lara</pre>
|
|
304
|
+
<pre class="cython line score-0"> <span class="">03</span>: #</pre>
|
|
305
|
+
<pre class="cython line score-0"> <span class="">04</span>: cdef class ModelException(Exception):</pre>
|
|
306
|
+
<pre class="cython line score-0"> <span class="">05</span>: """Base class for other Data-Model exceptions"""</pre>
|
|
307
|
+
<pre class="cython line score-0"> <span class="">06</span>: </pre>
|
|
308
|
+
<pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">07</span>: def __init__(self, str message, **kwargs):</pre>
|
|
309
|
+
<pre class='cython code score-47 '>/* Python wrapper */
|
|
310
|
+
static int __pyx_pw_9datamodel_10exceptions_14ModelException_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
311
|
+
static int __pyx_pw_9datamodel_10exceptions_14ModelException_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
312
|
+
PyObject *__pyx_v_message = 0;
|
|
313
|
+
PyObject *__pyx_v_kwargs = 0;
|
|
314
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
315
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
316
|
+
int __pyx_r;
|
|
317
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
318
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
|
|
319
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
320
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
321
|
+
#else
|
|
322
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
|
|
323
|
+
#endif
|
|
324
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
325
|
+
__pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
326
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs);
|
|
327
|
+
{
|
|
328
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,0};
|
|
329
|
+
PyObject* values[1] = {0};
|
|
330
|
+
if (__pyx_kwds) {
|
|
331
|
+
Py_ssize_t kw_args;
|
|
332
|
+
switch (__pyx_nargs) {
|
|
333
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
334
|
+
CYTHON_FALLTHROUGH;
|
|
335
|
+
case 0: break;
|
|
336
|
+
default: goto __pyx_L5_argtuple_error;
|
|
337
|
+
}
|
|
338
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_VARARGS</span>(__pyx_kwds);
|
|
339
|
+
switch (__pyx_nargs) {
|
|
340
|
+
case 0:
|
|
341
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_VARARGS</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) {
|
|
342
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(values[0]);
|
|
343
|
+
kw_args--;
|
|
344
|
+
}
|
|
345
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L3_error)</span>
|
|
346
|
+
else goto __pyx_L5_argtuple_error;
|
|
347
|
+
}
|
|
348
|
+
if (unlikely(kw_args > 0)) {
|
|
349
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
350
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L3_error)</span>
|
|
351
|
+
}
|
|
352
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
353
|
+
goto __pyx_L5_argtuple_error;
|
|
354
|
+
} else {
|
|
355
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
356
|
+
}
|
|
357
|
+
__pyx_v_message = ((PyObject*)values[0]);
|
|
358
|
+
}
|
|
359
|
+
goto __pyx_L6_skip;
|
|
360
|
+
__pyx_L5_argtuple_error:;
|
|
361
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L3_error)</span>
|
|
362
|
+
__pyx_L6_skip:;
|
|
363
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
364
|
+
__pyx_L3_error:;
|
|
365
|
+
{
|
|
366
|
+
Py_ssize_t __pyx_temp;
|
|
367
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
368
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
372
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ModelException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
373
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
374
|
+
return -1;
|
|
375
|
+
__pyx_L4_argument_unpacking_done:;
|
|
376
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_message), (&PyUnicode_Type), 1, "message", 1))) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
377
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_14ModelException___init__(((struct __pyx_obj_9datamodel_10exceptions_ModelException *)__pyx_v_self), __pyx_v_message, __pyx_v_kwargs);
|
|
378
|
+
int __pyx_lineno = 0;
|
|
379
|
+
const char *__pyx_filename = NULL;
|
|
380
|
+
int __pyx_clineno = 0;
|
|
381
|
+
|
|
382
|
+
/* function exit code */
|
|
383
|
+
goto __pyx_L0;
|
|
384
|
+
__pyx_L1_error:;
|
|
385
|
+
__pyx_r = -1;
|
|
386
|
+
__pyx_L0:;
|
|
387
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs);
|
|
388
|
+
{
|
|
389
|
+
Py_ssize_t __pyx_temp;
|
|
390
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
391
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
395
|
+
return __pyx_r;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
static int __pyx_pf_9datamodel_10exceptions_14ModelException___init__(struct __pyx_obj_9datamodel_10exceptions_ModelException *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_kwargs) {
|
|
399
|
+
int __pyx_r;
|
|
400
|
+
/* … */
|
|
401
|
+
/* function exit code */
|
|
402
|
+
__pyx_r = 0;
|
|
403
|
+
goto __pyx_L0;
|
|
404
|
+
__pyx_L1_error:;
|
|
405
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
406
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
407
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
408
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ModelException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
409
|
+
__pyx_r = -1;
|
|
410
|
+
__pyx_L0:;
|
|
411
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
412
|
+
return __pyx_r;
|
|
413
|
+
}
|
|
414
|
+
</pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">08</span>: super().__init__(message)</pre>
|
|
415
|
+
<pre class='cython code score-32 '> __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
416
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
417
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ModelException);
|
|
418
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ModelException);
|
|
419
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9datamodel_10exceptions_ModelException))) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>;
|
|
420
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_self);
|
|
421
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_v_self);
|
|
422
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>;
|
|
423
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
424
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
425
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
426
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
427
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
428
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
429
|
+
__pyx_t_3 = NULL;
|
|
430
|
+
__pyx_t_4 = 0;
|
|
431
|
+
#if CYTHON_UNPACK_METHODS
|
|
432
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
|
433
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
|
434
|
+
if (likely(__pyx_t_3)) {
|
|
435
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
|
436
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
437
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
438
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
|
439
|
+
__pyx_t_4 = 1;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
#endif
|
|
443
|
+
{
|
|
444
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_message};
|
|
445
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
446
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
447
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
448
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
449
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
450
|
+
}
|
|
451
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
452
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">09</span>: self.stacktrace = None</pre>
|
|
453
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_stacktrace, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 9, __pyx_L1_error)</span>
|
|
454
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">10</span>: if 'stacktrace' in kwargs:</pre>
|
|
455
|
+
<pre class='cython code score-2 '> __pyx_t_5 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_n_u_stacktrace, __pyx_v_kwargs, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
456
|
+
if (__pyx_t_5) {
|
|
457
|
+
/* … */
|
|
458
|
+
}
|
|
459
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">11</span>: self.stacktrace = kwargs['stacktrace']</pre>
|
|
460
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_kwargs, __pyx_n_u_stacktrace);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)</span>
|
|
461
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
462
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_stacktrace, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 11, __pyx_L1_error)</span>
|
|
463
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
464
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">12</span>: self.message = message</pre>
|
|
465
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_message, __pyx_v_message) < 0) <span class='error_goto'>__PYX_ERR(0, 12, __pyx_L1_error)</span>
|
|
466
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">13</span>: self.args = kwargs</pre>
|
|
467
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_args, __pyx_v_kwargs) < 0) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
468
|
+
</pre><pre class="cython line score-0"> <span class="">14</span>: </pre>
|
|
469
|
+
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">15</span>: def __repr__(self):</pre>
|
|
470
|
+
<pre class='cython code score-6 '>/* Python wrapper */
|
|
471
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_14ModelException_3__repr__(PyObject *__pyx_v_self); /*proto*/
|
|
472
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_14ModelException_3__repr__(PyObject *__pyx_v_self) {
|
|
473
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
474
|
+
PyObject *__pyx_r = 0;
|
|
475
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
476
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0);
|
|
477
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
478
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_14ModelException_2__repr__(((struct __pyx_obj_9datamodel_10exceptions_ModelException *)__pyx_v_self));
|
|
479
|
+
|
|
480
|
+
/* function exit code */
|
|
481
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
482
|
+
return __pyx_r;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
static PyObject *__pyx_pf_9datamodel_10exceptions_14ModelException_2__repr__(struct __pyx_obj_9datamodel_10exceptions_ModelException *__pyx_v_self) {
|
|
486
|
+
PyObject *__pyx_r = NULL;
|
|
487
|
+
/* … */
|
|
488
|
+
/* function exit code */
|
|
489
|
+
__pyx_L1_error:;
|
|
490
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
491
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
492
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ModelException.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
493
|
+
__pyx_r = NULL;
|
|
494
|
+
__pyx_L0:;
|
|
495
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
496
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
497
|
+
return __pyx_r;
|
|
498
|
+
}
|
|
499
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">16</span>: return f"{self.message}"</pre>
|
|
500
|
+
<pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
501
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_message);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)</span>
|
|
502
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
503
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_t_1, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)</span>
|
|
504
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
505
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
506
|
+
__pyx_r = __pyx_t_2;
|
|
507
|
+
__pyx_t_2 = 0;
|
|
508
|
+
goto __pyx_L0;
|
|
509
|
+
</pre><pre class="cython line score-0"> <span class="">17</span>: </pre>
|
|
510
|
+
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">18</span>: def __str__(self):</pre>
|
|
511
|
+
<pre class='cython code score-6 '>/* Python wrapper */
|
|
512
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_14ModelException_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
513
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_14ModelException_5__str__(PyObject *__pyx_v_self) {
|
|
514
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
515
|
+
PyObject *__pyx_r = 0;
|
|
516
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
517
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__str__ (wrapper)", 0);
|
|
518
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
519
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_14ModelException_4__str__(((struct __pyx_obj_9datamodel_10exceptions_ModelException *)__pyx_v_self));
|
|
520
|
+
|
|
521
|
+
/* function exit code */
|
|
522
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
523
|
+
return __pyx_r;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
static PyObject *__pyx_pf_9datamodel_10exceptions_14ModelException_4__str__(struct __pyx_obj_9datamodel_10exceptions_ModelException *__pyx_v_self) {
|
|
527
|
+
PyObject *__pyx_r = NULL;
|
|
528
|
+
/* … */
|
|
529
|
+
/* function exit code */
|
|
530
|
+
__pyx_L1_error:;
|
|
531
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
532
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
533
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ModelException.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
534
|
+
__pyx_r = NULL;
|
|
535
|
+
__pyx_L0:;
|
|
536
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
537
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
538
|
+
return __pyx_r;
|
|
539
|
+
}
|
|
540
|
+
</pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">19</span>: return f"{self.message!s}"</pre>
|
|
541
|
+
<pre class='cython code score-11 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
542
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_message);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)</span>
|
|
543
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
544
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Unicode</span>(__pyx_t_1), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span>
|
|
545
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
546
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
547
|
+
__pyx_r = __pyx_t_2;
|
|
548
|
+
__pyx_t_2 = 0;
|
|
549
|
+
goto __pyx_L0;
|
|
550
|
+
</pre><pre class="cython line score-0"> <span class="">20</span>: </pre>
|
|
551
|
+
<pre class="cython line score-35" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">21</span>: def get(self):</pre>
|
|
552
|
+
<pre class='cython code score-35 '>/* Python wrapper */
|
|
553
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_14ModelException_7get(PyObject *__pyx_v_self,
|
|
554
|
+
#if CYTHON_METH_FASTCALL
|
|
555
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
556
|
+
#else
|
|
557
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
558
|
+
#endif
|
|
559
|
+
); /*proto*/
|
|
560
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_10exceptions_14ModelException_6get, "ModelException.get(self)");
|
|
561
|
+
static PyMethodDef __pyx_mdef_9datamodel_10exceptions_14ModelException_7get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_10exceptions_14ModelException_7get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_10exceptions_14ModelException_6get};
|
|
562
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_14ModelException_7get(PyObject *__pyx_v_self,
|
|
563
|
+
#if CYTHON_METH_FASTCALL
|
|
564
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
565
|
+
#else
|
|
566
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
567
|
+
#endif
|
|
568
|
+
) {
|
|
569
|
+
#if !CYTHON_METH_FASTCALL
|
|
570
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
571
|
+
#endif
|
|
572
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
573
|
+
PyObject *__pyx_r = 0;
|
|
574
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
575
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get (wrapper)", 0);
|
|
576
|
+
#if !CYTHON_METH_FASTCALL
|
|
577
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
578
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
579
|
+
#else
|
|
580
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
581
|
+
#endif
|
|
582
|
+
#endif
|
|
583
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
584
|
+
if (unlikely(__pyx_nargs > 0)) {
|
|
585
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get", 1, 0, 0, __pyx_nargs); return NULL;}
|
|
586
|
+
if (unlikely(__pyx_kwds) && <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "get", 0))) return NULL;
|
|
587
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_14ModelException_6get(((struct __pyx_obj_9datamodel_10exceptions_ModelException *)__pyx_v_self));
|
|
588
|
+
|
|
589
|
+
/* function exit code */
|
|
590
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
591
|
+
return __pyx_r;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
static PyObject *__pyx_pf_9datamodel_10exceptions_14ModelException_6get(struct __pyx_obj_9datamodel_10exceptions_ModelException *__pyx_v_self) {
|
|
595
|
+
PyObject *__pyx_r = NULL;
|
|
596
|
+
/* … */
|
|
597
|
+
/* function exit code */
|
|
598
|
+
__pyx_L1_error:;
|
|
599
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
600
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ModelException.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
601
|
+
__pyx_r = NULL;
|
|
602
|
+
__pyx_L0:;
|
|
603
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
604
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
605
|
+
return __pyx_r;
|
|
606
|
+
}
|
|
607
|
+
/* … */
|
|
608
|
+
__pyx_tuple__6 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 21, __pyx_L1_error)</span>
|
|
609
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__6);
|
|
610
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__6);
|
|
611
|
+
/* … */
|
|
612
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_10exceptions_14ModelException_7get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ModelException_get, NULL, __pyx_n_s_datamodel_exceptions, __pyx_d, ((PyObject *)__pyx_codeobj__7));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)</span>
|
|
613
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
614
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ModelException, __pyx_n_s_get, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 21, __pyx_L1_error)</span>
|
|
615
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
616
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_10exceptions_ModelException);
|
|
617
|
+
__pyx_codeobj__7 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_exceptions_pyx, __pyx_n_s_get, 21, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 21, __pyx_L1_error)</span>
|
|
618
|
+
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">22</span>: return self.message</pre>
|
|
619
|
+
<pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
620
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_message);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)</span>
|
|
621
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
622
|
+
__pyx_r = __pyx_t_1;
|
|
623
|
+
__pyx_t_1 = 0;
|
|
624
|
+
goto __pyx_L0;
|
|
625
|
+
</pre><pre class="cython line score-0"> <span class="">23</span>: </pre>
|
|
626
|
+
<pre class="cython line score-0"> <span class="">24</span>: cdef class ValidationError(ModelException):</pre>
|
|
627
|
+
<pre class="cython line score-0"> <span class="">25</span>: """Validation Error."""</pre>
|
|
628
|
+
<pre class="cython line score-57" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">26</span>: def __init__(self, str message, dict payload = None):</pre>
|
|
629
|
+
<pre class='cython code score-57 '>/* Python wrapper */
|
|
630
|
+
static int __pyx_pw_9datamodel_10exceptions_15ValidationError_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
631
|
+
static int __pyx_pw_9datamodel_10exceptions_15ValidationError_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
632
|
+
PyObject *__pyx_v_message = 0;
|
|
633
|
+
PyObject *__pyx_v_payload = 0;
|
|
634
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
635
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
636
|
+
int __pyx_r;
|
|
637
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
638
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
|
|
639
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
640
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
641
|
+
#else
|
|
642
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
|
|
643
|
+
#endif
|
|
644
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
645
|
+
{
|
|
646
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,&__pyx_n_s_payload,0};
|
|
647
|
+
PyObject* values[2] = {0,0};
|
|
648
|
+
values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(((PyObject*)Py_None));
|
|
649
|
+
if (__pyx_kwds) {
|
|
650
|
+
Py_ssize_t kw_args;
|
|
651
|
+
switch (__pyx_nargs) {
|
|
652
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 1);
|
|
653
|
+
CYTHON_FALLTHROUGH;
|
|
654
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
655
|
+
CYTHON_FALLTHROUGH;
|
|
656
|
+
case 0: break;
|
|
657
|
+
default: goto __pyx_L5_argtuple_error;
|
|
658
|
+
}
|
|
659
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_VARARGS</span>(__pyx_kwds);
|
|
660
|
+
switch (__pyx_nargs) {
|
|
661
|
+
case 0:
|
|
662
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_VARARGS</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) {
|
|
663
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(values[0]);
|
|
664
|
+
kw_args--;
|
|
665
|
+
}
|
|
666
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
667
|
+
else goto __pyx_L5_argtuple_error;
|
|
668
|
+
CYTHON_FALLTHROUGH;
|
|
669
|
+
case 1:
|
|
670
|
+
if (kw_args > 0) {
|
|
671
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_VARARGS</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_payload);
|
|
672
|
+
if (value) { values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(value); kw_args--; }
|
|
673
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
if (unlikely(kw_args > 0)) {
|
|
677
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
678
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
679
|
+
}
|
|
680
|
+
} else {
|
|
681
|
+
switch (__pyx_nargs) {
|
|
682
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 1);
|
|
683
|
+
CYTHON_FALLTHROUGH;
|
|
684
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
685
|
+
break;
|
|
686
|
+
default: goto __pyx_L5_argtuple_error;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
__pyx_v_message = ((PyObject*)values[0]);
|
|
690
|
+
__pyx_v_payload = ((PyObject*)values[1]);
|
|
691
|
+
}
|
|
692
|
+
goto __pyx_L6_skip;
|
|
693
|
+
__pyx_L5_argtuple_error:;
|
|
694
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 0, 1, 2, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
695
|
+
__pyx_L6_skip:;
|
|
696
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
697
|
+
__pyx_L3_error:;
|
|
698
|
+
{
|
|
699
|
+
Py_ssize_t __pyx_temp;
|
|
700
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
701
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ValidationError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
705
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
706
|
+
return -1;
|
|
707
|
+
__pyx_L4_argument_unpacking_done:;
|
|
708
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_message), (&PyUnicode_Type), 1, "message", 1))) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
709
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_payload), (&PyDict_Type), 1, "payload", 1))) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
710
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_15ValidationError___init__(((struct __pyx_obj_9datamodel_10exceptions_ValidationError *)__pyx_v_self), __pyx_v_message, __pyx_v_payload);
|
|
711
|
+
|
|
712
|
+
/* function exit code */
|
|
713
|
+
goto __pyx_L0;
|
|
714
|
+
__pyx_L1_error:;
|
|
715
|
+
__pyx_r = -1;
|
|
716
|
+
__pyx_L0:;
|
|
717
|
+
{
|
|
718
|
+
Py_ssize_t __pyx_temp;
|
|
719
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
720
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
724
|
+
return __pyx_r;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
static int __pyx_pf_9datamodel_10exceptions_15ValidationError___init__(struct __pyx_obj_9datamodel_10exceptions_ValidationError *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_payload) {
|
|
728
|
+
int __pyx_r;
|
|
729
|
+
/* … */
|
|
730
|
+
/* function exit code */
|
|
731
|
+
__pyx_r = 0;
|
|
732
|
+
goto __pyx_L0;
|
|
733
|
+
__pyx_L1_error:;
|
|
734
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
735
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
736
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
737
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ValidationError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
738
|
+
__pyx_r = -1;
|
|
739
|
+
__pyx_L0:;
|
|
740
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
741
|
+
return __pyx_r;
|
|
742
|
+
}
|
|
743
|
+
</pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">27</span>: super().__init__(message)</pre>
|
|
744
|
+
<pre class='cython code score-32 '> __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)</span>
|
|
745
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
746
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ValidationError);
|
|
747
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ValidationError);
|
|
748
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9datamodel_10exceptions_ValidationError))) <span class='error_goto'>__PYX_ERR(0, 27, __pyx_L1_error)</span>;
|
|
749
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_self);
|
|
750
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_v_self);
|
|
751
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) <span class='error_goto'>__PYX_ERR(0, 27, __pyx_L1_error)</span>;
|
|
752
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)</span>
|
|
753
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
754
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
755
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)</span>
|
|
756
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
757
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
758
|
+
__pyx_t_3 = NULL;
|
|
759
|
+
__pyx_t_4 = 0;
|
|
760
|
+
#if CYTHON_UNPACK_METHODS
|
|
761
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
|
762
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
|
763
|
+
if (likely(__pyx_t_3)) {
|
|
764
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
|
765
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
766
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
767
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
|
768
|
+
__pyx_t_4 = 1;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
#endif
|
|
772
|
+
{
|
|
773
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_message};
|
|
774
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
775
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
776
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 27, __pyx_L1_error)</span>
|
|
777
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
778
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
779
|
+
}
|
|
780
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
781
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">28</span>: self.payload = payload or {}</pre>
|
|
782
|
+
<pre class='cython code score-10 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_payload); if (unlikely((__pyx_t_5 < 0))) <span class='error_goto'>__PYX_ERR(0, 28, __pyx_L1_error)</span>
|
|
783
|
+
if (!__pyx_t_5) {
|
|
784
|
+
} else {
|
|
785
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_payload);
|
|
786
|
+
__pyx_t_1 = __pyx_v_payload;
|
|
787
|
+
goto __pyx_L3_bool_binop_done;
|
|
788
|
+
}
|
|
789
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)</span>
|
|
790
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
791
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);
|
|
792
|
+
__pyx_t_1 = __pyx_t_2;
|
|
793
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
794
|
+
__pyx_L3_bool_binop_done:;
|
|
795
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_payload, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 28, __pyx_L1_error)</span>
|
|
796
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
797
|
+
</pre><pre class="cython line score-0"> <span class="">29</span>: </pre>
|
|
798
|
+
<pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">30</span>: def __str__(self):</pre>
|
|
799
|
+
<pre class='cython code score-9 '>/* Python wrapper */
|
|
800
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_15ValidationError_3__str__(PyObject *__pyx_v_self); /*proto*/
|
|
801
|
+
static PyObject *__pyx_pw_9datamodel_10exceptions_15ValidationError_3__str__(PyObject *__pyx_v_self) {
|
|
802
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
803
|
+
PyObject *__pyx_r = 0;
|
|
804
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
805
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__str__ (wrapper)", 0);
|
|
806
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
807
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_15ValidationError_2__str__(((struct __pyx_obj_9datamodel_10exceptions_ValidationError *)__pyx_v_self));
|
|
808
|
+
|
|
809
|
+
/* function exit code */
|
|
810
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
811
|
+
return __pyx_r;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
static PyObject *__pyx_pf_9datamodel_10exceptions_15ValidationError_2__str__(struct __pyx_obj_9datamodel_10exceptions_ValidationError *__pyx_v_self) {
|
|
815
|
+
PyObject *__pyx_v_base = NULL;
|
|
816
|
+
PyObject *__pyx_v_field_names = NULL;
|
|
817
|
+
PyObject *__pyx_r = NULL;
|
|
818
|
+
/* … */
|
|
819
|
+
/* function exit code */
|
|
820
|
+
__pyx_L1_error:;
|
|
821
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
822
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
823
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
824
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ValidationError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
825
|
+
__pyx_r = NULL;
|
|
826
|
+
__pyx_L0:;
|
|
827
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_base);
|
|
828
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_field_names);
|
|
829
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
830
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
831
|
+
return __pyx_r;
|
|
832
|
+
}
|
|
833
|
+
</pre><pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">31</span>: base = super().__str__()</pre>
|
|
834
|
+
<pre class='cython code score-31 '> __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
835
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
836
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ValidationError);
|
|
837
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ValidationError);
|
|
838
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_9datamodel_10exceptions_ValidationError))) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L1_error)</span>;
|
|
839
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_self);
|
|
840
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_v_self);
|
|
841
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L1_error)</span>;
|
|
842
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
843
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
844
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
845
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_str);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
846
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
847
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
848
|
+
__pyx_t_3 = NULL;
|
|
849
|
+
__pyx_t_4 = 0;
|
|
850
|
+
#if CYTHON_UNPACK_METHODS
|
|
851
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
|
852
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
|
853
|
+
if (likely(__pyx_t_3)) {
|
|
854
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
|
855
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
856
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
857
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
|
858
|
+
__pyx_t_4 = 1;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
#endif
|
|
862
|
+
{
|
|
863
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
|
|
864
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
|
|
865
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
866
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
867
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
868
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
869
|
+
}
|
|
870
|
+
__pyx_v_base = __pyx_t_1;
|
|
871
|
+
__pyx_t_1 = 0;
|
|
872
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">32</span>: if self.payload:</pre>
|
|
873
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_payload);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)</span>
|
|
874
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
875
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) <span class='error_goto'>__PYX_ERR(0, 32, __pyx_L1_error)</span>
|
|
876
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
877
|
+
if (__pyx_t_5) {
|
|
878
|
+
/* … */
|
|
879
|
+
}
|
|
880
|
+
</pre><pre class="cython line score-0"> <span class="">33</span>: # collect the keys that had errors</pre>
|
|
881
|
+
<pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">34</span>: field_names = ", ".join(self.payload.keys())</pre>
|
|
882
|
+
<pre class='cython code score-25 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_payload);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)</span>
|
|
883
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
884
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_keys);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)</span>
|
|
885
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
886
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
887
|
+
__pyx_t_2 = NULL;
|
|
888
|
+
__pyx_t_4 = 0;
|
|
889
|
+
#if CYTHON_UNPACK_METHODS
|
|
890
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) {
|
|
891
|
+
__pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3);
|
|
892
|
+
if (likely(__pyx_t_2)) {
|
|
893
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3);
|
|
894
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);
|
|
895
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
896
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function);
|
|
897
|
+
__pyx_t_4 = 1;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
#endif
|
|
901
|
+
{
|
|
902
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
|
|
903
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
|
|
904
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
905
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 34, __pyx_L1_error)</span>
|
|
906
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
907
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
908
|
+
}
|
|
909
|
+
__pyx_t_3 = <span class='py_c_api'>PyUnicode_Join</span>(__pyx_kp_u_, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)</span>
|
|
910
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
911
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
912
|
+
__pyx_v_field_names = ((PyObject*)__pyx_t_3);
|
|
913
|
+
__pyx_t_3 = 0;
|
|
914
|
+
</pre><pre class="cython line score-0"> <span class="">35</span>: # attach them to the base message so we see them in the final str</pre>
|
|
915
|
+
<pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">36</span>: return f"{base} (Fields with errors: {field_names})"</pre>
|
|
916
|
+
<pre class='cython code score-31 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
917
|
+
__pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(4);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
918
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
919
|
+
__pyx_t_6 = 0;
|
|
920
|
+
__pyx_t_7 = 127;
|
|
921
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_v_base, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
922
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
923
|
+
__pyx_t_7 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) > __pyx_t_7) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) : __pyx_t_7;
|
|
924
|
+
__pyx_t_6 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_1);
|
|
925
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
926
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_1);
|
|
927
|
+
__pyx_t_1 = 0;
|
|
928
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_Fields_with_errors);
|
|
929
|
+
__pyx_t_6 += 22;
|
|
930
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_Fields_with_errors);
|
|
931
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_kp_u_Fields_with_errors);
|
|
932
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyUnicode_Unicode</span>(__pyx_v_field_names);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
933
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
934
|
+
__pyx_t_7 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) > __pyx_t_7) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) : __pyx_t_7;
|
|
935
|
+
__pyx_t_6 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_1);
|
|
936
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
937
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 2, __pyx_t_1);
|
|
938
|
+
__pyx_t_1 = 0;
|
|
939
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__2);
|
|
940
|
+
__pyx_t_6 += 1;
|
|
941
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__2);
|
|
942
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 3, __pyx_kp_u__2);
|
|
943
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_3, 4, __pyx_t_6, __pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
944
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
945
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
946
|
+
__pyx_r = __pyx_t_1;
|
|
947
|
+
__pyx_t_1 = 0;
|
|
948
|
+
goto __pyx_L0;
|
|
949
|
+
</pre><pre class="cython line score-0"> <span class="">37</span>: else:</pre>
|
|
950
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">38</span>: return base</pre>
|
|
951
|
+
<pre class='cython code score-2 '> /*else*/ {
|
|
952
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
953
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_base);
|
|
954
|
+
__pyx_r = __pyx_v_base;
|
|
955
|
+
goto __pyx_L0;
|
|
956
|
+
}
|
|
957
|
+
</pre><pre class="cython line score-0"> <span class="">39</span>: </pre>
|
|
958
|
+
<pre class="cython line score-0"> <span class="">40</span>: cdef class ParsingError(ModelException):</pre>
|
|
959
|
+
<pre class="cython line score-0"> <span class="">41</span>: """Parsing Error."""</pre>
|
|
960
|
+
<pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">42</span>: def __init__(self, str message):</pre>
|
|
961
|
+
<pre class='cython code score-42 '>/* Python wrapper */
|
|
962
|
+
static int __pyx_pw_9datamodel_10exceptions_12ParsingError_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
963
|
+
static int __pyx_pw_9datamodel_10exceptions_12ParsingError_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
964
|
+
PyObject *__pyx_v_message = 0;
|
|
965
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
966
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
967
|
+
int __pyx_r;
|
|
968
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
969
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
|
|
970
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
971
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
972
|
+
#else
|
|
973
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
|
|
974
|
+
#endif
|
|
975
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
976
|
+
{
|
|
977
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,0};
|
|
978
|
+
PyObject* values[1] = {0};
|
|
979
|
+
if (__pyx_kwds) {
|
|
980
|
+
Py_ssize_t kw_args;
|
|
981
|
+
switch (__pyx_nargs) {
|
|
982
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
983
|
+
CYTHON_FALLTHROUGH;
|
|
984
|
+
case 0: break;
|
|
985
|
+
default: goto __pyx_L5_argtuple_error;
|
|
986
|
+
}
|
|
987
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_VARARGS</span>(__pyx_kwds);
|
|
988
|
+
switch (__pyx_nargs) {
|
|
989
|
+
case 0:
|
|
990
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_VARARGS</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) {
|
|
991
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(values[0]);
|
|
992
|
+
kw_args--;
|
|
993
|
+
}
|
|
994
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 42, __pyx_L3_error)</span>
|
|
995
|
+
else goto __pyx_L5_argtuple_error;
|
|
996
|
+
}
|
|
997
|
+
if (unlikely(kw_args > 0)) {
|
|
998
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
999
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 42, __pyx_L3_error)</span>
|
|
1000
|
+
}
|
|
1001
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
1002
|
+
goto __pyx_L5_argtuple_error;
|
|
1003
|
+
} else {
|
|
1004
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
1005
|
+
}
|
|
1006
|
+
__pyx_v_message = ((PyObject*)values[0]);
|
|
1007
|
+
}
|
|
1008
|
+
goto __pyx_L6_skip;
|
|
1009
|
+
__pyx_L5_argtuple_error:;
|
|
1010
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 42, __pyx_L3_error)</span>
|
|
1011
|
+
__pyx_L6_skip:;
|
|
1012
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1013
|
+
__pyx_L3_error:;
|
|
1014
|
+
{
|
|
1015
|
+
Py_ssize_t __pyx_temp;
|
|
1016
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1017
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ParsingError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1021
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1022
|
+
return -1;
|
|
1023
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1024
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_message), (&PyUnicode_Type), 1, "message", 1))) <span class='error_goto'>__PYX_ERR(0, 42, __pyx_L1_error)</span>
|
|
1025
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_12ParsingError___init__(((struct __pyx_obj_9datamodel_10exceptions_ParsingError *)__pyx_v_self), __pyx_v_message);
|
|
1026
|
+
int __pyx_lineno = 0;
|
|
1027
|
+
const char *__pyx_filename = NULL;
|
|
1028
|
+
int __pyx_clineno = 0;
|
|
1029
|
+
|
|
1030
|
+
/* function exit code */
|
|
1031
|
+
goto __pyx_L0;
|
|
1032
|
+
__pyx_L1_error:;
|
|
1033
|
+
__pyx_r = -1;
|
|
1034
|
+
__pyx_L0:;
|
|
1035
|
+
{
|
|
1036
|
+
Py_ssize_t __pyx_temp;
|
|
1037
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1038
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1042
|
+
return __pyx_r;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
static int __pyx_pf_9datamodel_10exceptions_12ParsingError___init__(struct __pyx_obj_9datamodel_10exceptions_ParsingError *__pyx_v_self, PyObject *__pyx_v_message) {
|
|
1046
|
+
int __pyx_r;
|
|
1047
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_message);
|
|
1048
|
+
/* … */
|
|
1049
|
+
/* function exit code */
|
|
1050
|
+
__pyx_r = 0;
|
|
1051
|
+
goto __pyx_L0;
|
|
1052
|
+
__pyx_L1_error:;
|
|
1053
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1054
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
1055
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
1056
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ParsingError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1057
|
+
__pyx_r = -1;
|
|
1058
|
+
__pyx_L0:;
|
|
1059
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_message);
|
|
1060
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1061
|
+
return __pyx_r;
|
|
1062
|
+
}
|
|
1063
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">43</span>: message = f'Parsing Error: {message}'</pre>
|
|
1064
|
+
<pre class='cython code score-6 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyUnicode_Unicode</span>(__pyx_v_message);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)</span>
|
|
1065
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1066
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyUnicode_Concat</span>(__pyx_kp_u_Parsing_Error, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)</span>
|
|
1067
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1068
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1069
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_message, ((PyObject*)__pyx_t_2));
|
|
1070
|
+
__pyx_t_2 = 0;
|
|
1071
|
+
</pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">44</span>: super().__init__(message)</pre>
|
|
1072
|
+
<pre class='cython code score-32 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)</span>
|
|
1073
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1074
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ParsingError);
|
|
1075
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ParsingError);
|
|
1076
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_9datamodel_10exceptions_ParsingError))) <span class='error_goto'>__PYX_ERR(0, 44, __pyx_L1_error)</span>;
|
|
1077
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_self);
|
|
1078
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_v_self);
|
|
1079
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 1, ((PyObject *)__pyx_v_self))) <span class='error_goto'>__PYX_ERR(0, 44, __pyx_L1_error)</span>;
|
|
1080
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_1, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)</span>
|
|
1081
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1082
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1083
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)</span>
|
|
1084
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1085
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1086
|
+
__pyx_t_3 = NULL;
|
|
1087
|
+
__pyx_t_4 = 0;
|
|
1088
|
+
#if CYTHON_UNPACK_METHODS
|
|
1089
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) {
|
|
1090
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1);
|
|
1091
|
+
if (likely(__pyx_t_3)) {
|
|
1092
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1);
|
|
1093
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
1094
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1095
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function);
|
|
1096
|
+
__pyx_t_4 = 1;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
#endif
|
|
1100
|
+
{
|
|
1101
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_message};
|
|
1102
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
1103
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1104
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 44, __pyx_L1_error)</span>
|
|
1105
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1106
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1107
|
+
}
|
|
1108
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1109
|
+
</pre><pre class="cython line score-0"> <span class="">45</span>: </pre>
|
|
1110
|
+
<pre class="cython line score-0"> <span class="">46</span>: cdef class ParserError(ModelException):</pre>
|
|
1111
|
+
<pre class="cython line score-0"> <span class="">47</span>: """Parsing Error."""</pre>
|
|
1112
|
+
<pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">48</span>: def __init__(self, str message):</pre>
|
|
1113
|
+
<pre class='cython code score-42 '>/* Python wrapper */
|
|
1114
|
+
static int __pyx_pw_9datamodel_10exceptions_11ParserError_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
1115
|
+
static int __pyx_pw_9datamodel_10exceptions_11ParserError_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
1116
|
+
PyObject *__pyx_v_message = 0;
|
|
1117
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1118
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1119
|
+
int __pyx_r;
|
|
1120
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1121
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
|
|
1122
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1123
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1124
|
+
#else
|
|
1125
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
|
|
1126
|
+
#endif
|
|
1127
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1128
|
+
{
|
|
1129
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,0};
|
|
1130
|
+
PyObject* values[1] = {0};
|
|
1131
|
+
if (__pyx_kwds) {
|
|
1132
|
+
Py_ssize_t kw_args;
|
|
1133
|
+
switch (__pyx_nargs) {
|
|
1134
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
1135
|
+
CYTHON_FALLTHROUGH;
|
|
1136
|
+
case 0: break;
|
|
1137
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1138
|
+
}
|
|
1139
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_VARARGS</span>(__pyx_kwds);
|
|
1140
|
+
switch (__pyx_nargs) {
|
|
1141
|
+
case 0:
|
|
1142
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_VARARGS</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) {
|
|
1143
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(values[0]);
|
|
1144
|
+
kw_args--;
|
|
1145
|
+
}
|
|
1146
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 48, __pyx_L3_error)</span>
|
|
1147
|
+
else goto __pyx_L5_argtuple_error;
|
|
1148
|
+
}
|
|
1149
|
+
if (unlikely(kw_args > 0)) {
|
|
1150
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
1151
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 48, __pyx_L3_error)</span>
|
|
1152
|
+
}
|
|
1153
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
1154
|
+
goto __pyx_L5_argtuple_error;
|
|
1155
|
+
} else {
|
|
1156
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_VARARGS</span>(__pyx_args, 0);
|
|
1157
|
+
}
|
|
1158
|
+
__pyx_v_message = ((PyObject*)values[0]);
|
|
1159
|
+
}
|
|
1160
|
+
goto __pyx_L6_skip;
|
|
1161
|
+
__pyx_L5_argtuple_error:;
|
|
1162
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 48, __pyx_L3_error)</span>
|
|
1163
|
+
__pyx_L6_skip:;
|
|
1164
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1165
|
+
__pyx_L3_error:;
|
|
1166
|
+
{
|
|
1167
|
+
Py_ssize_t __pyx_temp;
|
|
1168
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1169
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ParserError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1173
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1174
|
+
return -1;
|
|
1175
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1176
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_message), (&PyUnicode_Type), 1, "message", 1))) <span class='error_goto'>__PYX_ERR(0, 48, __pyx_L1_error)</span>
|
|
1177
|
+
__pyx_r = __pyx_pf_9datamodel_10exceptions_11ParserError___init__(((struct __pyx_obj_9datamodel_10exceptions_ParserError *)__pyx_v_self), __pyx_v_message);
|
|
1178
|
+
int __pyx_lineno = 0;
|
|
1179
|
+
const char *__pyx_filename = NULL;
|
|
1180
|
+
int __pyx_clineno = 0;
|
|
1181
|
+
|
|
1182
|
+
/* function exit code */
|
|
1183
|
+
goto __pyx_L0;
|
|
1184
|
+
__pyx_L1_error:;
|
|
1185
|
+
__pyx_r = -1;
|
|
1186
|
+
__pyx_L0:;
|
|
1187
|
+
{
|
|
1188
|
+
Py_ssize_t __pyx_temp;
|
|
1189
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1190
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1194
|
+
return __pyx_r;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
static int __pyx_pf_9datamodel_10exceptions_11ParserError___init__(struct __pyx_obj_9datamodel_10exceptions_ParserError *__pyx_v_self, PyObject *__pyx_v_message) {
|
|
1198
|
+
int __pyx_r;
|
|
1199
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_message);
|
|
1200
|
+
/* … */
|
|
1201
|
+
/* function exit code */
|
|
1202
|
+
__pyx_r = 0;
|
|
1203
|
+
goto __pyx_L0;
|
|
1204
|
+
__pyx_L1_error:;
|
|
1205
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1206
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
1207
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
1208
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.exceptions.ParserError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1209
|
+
__pyx_r = -1;
|
|
1210
|
+
__pyx_L0:;
|
|
1211
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_message);
|
|
1212
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1213
|
+
return __pyx_r;
|
|
1214
|
+
}
|
|
1215
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">49</span>: message = f'Parsing Error: {message}'</pre>
|
|
1216
|
+
<pre class='cython code score-6 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyUnicode_Unicode</span>(__pyx_v_message);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)</span>
|
|
1217
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1218
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyUnicode_Concat</span>(__pyx_kp_u_Parsing_Error, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)</span>
|
|
1219
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1220
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1221
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_message, ((PyObject*)__pyx_t_2));
|
|
1222
|
+
__pyx_t_2 = 0;
|
|
1223
|
+
</pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">50</span>: super().__init__(message)</pre>
|
|
1224
|
+
<pre class='cython code score-32 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
1225
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1226
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ParserError);
|
|
1227
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_ptype_9datamodel_10exceptions_ParserError);
|
|
1228
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_9datamodel_10exceptions_ParserError))) <span class='error_goto'>__PYX_ERR(0, 50, __pyx_L1_error)</span>;
|
|
1229
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_self);
|
|
1230
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_v_self);
|
|
1231
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 1, ((PyObject *)__pyx_v_self))) <span class='error_goto'>__PYX_ERR(0, 50, __pyx_L1_error)</span>;
|
|
1232
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_1, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
1233
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1234
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1235
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
1236
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1237
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1238
|
+
__pyx_t_3 = NULL;
|
|
1239
|
+
__pyx_t_4 = 0;
|
|
1240
|
+
#if CYTHON_UNPACK_METHODS
|
|
1241
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) {
|
|
1242
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1);
|
|
1243
|
+
if (likely(__pyx_t_3)) {
|
|
1244
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1);
|
|
1245
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
1246
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1247
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function);
|
|
1248
|
+
__pyx_t_4 = 1;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
#endif
|
|
1252
|
+
{
|
|
1253
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_message};
|
|
1254
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
1255
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1256
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
1257
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1258
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1259
|
+
}
|
|
1260
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1261
|
+
</pre></div></body></html>
|