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
datamodel/fields.html
ADDED
|
@@ -0,0 +1,3912 @@
|
|
|
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: fields.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="fields.cpp">fields.cpp</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="">001</span>: # cython: language_level=3, embedsignature=True, initializedcheck=False</pre>
|
|
299
|
+
<pre class='cython code score-8 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
300
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
301
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
302
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
303
|
+
</pre><pre class="cython line score-0"> <span class="">002</span>: # Copyright (C) 2018-present Jesus Lara</pre>
|
|
304
|
+
<pre class="cython line score-0"> <span class="">003</span>: #</pre>
|
|
305
|
+
<pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">004</span>: from sys import version_info</pre>
|
|
306
|
+
<pre class='cython code score-20 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)</span>
|
|
307
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
308
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_version_info);
|
|
309
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_version_info);
|
|
310
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_version_info)) <span class='error_goto'>__PYX_ERR(0, 4, __pyx_L1_error)</span>;
|
|
311
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_sys, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4, __pyx_L1_error)</span>
|
|
312
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
313
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
314
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_version_info);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)</span>
|
|
315
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
316
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_version_info, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 4, __pyx_L1_error)</span>
|
|
317
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
318
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
319
|
+
</pre><pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">005</span>: from typing import (</pre>
|
|
320
|
+
<pre class='cython code score-28 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_typing, __pyx_t_3, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
321
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
322
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
323
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Optional);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
324
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
325
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Optional, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
326
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
327
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Union);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
328
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
329
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Union, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
330
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
331
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Any);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
332
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
333
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Any, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
334
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
335
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
336
|
+
</pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">006</span>: Optional,</pre>
|
|
337
|
+
<pre class='cython code score-14 '> __pyx_t_3 = <span class='py_c_api'>PyList_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
338
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
339
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Optional);
|
|
340
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Optional);
|
|
341
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 0, __pyx_n_s_Optional)) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>;
|
|
342
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Union);
|
|
343
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Union);
|
|
344
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 1, __pyx_n_s_Union)) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>;
|
|
345
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Any);
|
|
346
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Any);
|
|
347
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 2, __pyx_n_s_Any)) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>;
|
|
348
|
+
</pre><pre class="cython line score-0"> <span class="">007</span>: Union,</pre>
|
|
349
|
+
<pre class="cython line score-0"> <span class="">008</span>: Any</pre>
|
|
350
|
+
<pre class="cython line score-0"> <span class="">009</span>: )</pre>
|
|
351
|
+
<pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">010</span>: from functools import wraps</pre>
|
|
352
|
+
<pre class='cython code score-20 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
353
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
354
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_wraps);
|
|
355
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_wraps);
|
|
356
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_wraps)) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>;
|
|
357
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_functools, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
358
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
359
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
360
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_wraps);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
361
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
362
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_wraps, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
363
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
364
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
365
|
+
</pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">011</span>: from collections.abc import Callable</pre>
|
|
366
|
+
<pre class='cython code score-20 '> __pyx_t_3 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error)</span>
|
|
367
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
368
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Callable);
|
|
369
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Callable);
|
|
370
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 0, __pyx_n_s_Callable)) <span class='error_goto'>__PYX_ERR(0, 11, __pyx_L1_error)</span>;
|
|
371
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_collections_abc, __pyx_t_3, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)</span>
|
|
372
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
373
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
374
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Callable);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error)</span>
|
|
375
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
376
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Callable, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 11, __pyx_L1_error)</span>
|
|
377
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
378
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
379
|
+
</pre><pre class="cython line score-36" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">012</span>: from dataclasses import (</pre>
|
|
380
|
+
<pre class='cython code score-36 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_dataclasses, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)</span>
|
|
381
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
382
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
383
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_FIELD);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)</span>
|
|
384
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
385
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_FIELD, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
386
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
387
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_MISSING);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)</span>
|
|
388
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
389
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_MISSING, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L1_error)</span>
|
|
390
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
391
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_MISSING_TYPE);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)</span>
|
|
392
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
393
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_MISSING_TYPE, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>
|
|
394
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
395
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_EMPTY_METADATA);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)</span>
|
|
396
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
397
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_EMPTY_METADATA, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 16, __pyx_L1_error)</span>
|
|
398
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
399
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
400
|
+
</pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">013</span>: _FIELD,</pre>
|
|
401
|
+
<pre class='cython code score-17 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
402
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
403
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_FIELD);
|
|
404
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_FIELD);
|
|
405
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_FIELD)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>;
|
|
406
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_MISSING);
|
|
407
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_MISSING);
|
|
408
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 1, __pyx_n_s_MISSING)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>;
|
|
409
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_MISSING_TYPE);
|
|
410
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_MISSING_TYPE);
|
|
411
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 2, __pyx_n_s_MISSING_TYPE)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>;
|
|
412
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_EMPTY_METADATA);
|
|
413
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_EMPTY_METADATA);
|
|
414
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 3, __pyx_n_s_EMPTY_METADATA)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>;
|
|
415
|
+
</pre><pre class="cython line score-0"> <span class="">014</span>: MISSING,</pre>
|
|
416
|
+
<pre class="cython line score-0"> <span class="">015</span>: _MISSING_TYPE,</pre>
|
|
417
|
+
<pre class="cython line score-0"> <span class="">016</span>: _EMPTY_METADATA</pre>
|
|
418
|
+
<pre class="cython line score-0"> <span class="">017</span>: )</pre>
|
|
419
|
+
<pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">018</span>: from dataclasses import Field as ff</pre>
|
|
420
|
+
<pre class='cython code score-20 '> __pyx_t_3 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)</span>
|
|
421
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
422
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Field);
|
|
423
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Field);
|
|
424
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 0, __pyx_n_s_Field)) <span class='error_goto'>__PYX_ERR(0, 18, __pyx_L1_error)</span>;
|
|
425
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_dataclasses, __pyx_t_3, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)</span>
|
|
426
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
427
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
428
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Field);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)</span>
|
|
429
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
430
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_ff, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 18, __pyx_L1_error)</span>
|
|
431
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
432
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
433
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">019</span>: import _thread</pre>
|
|
434
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportDottedModule</span>(__pyx_n_s_thread, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span>
|
|
435
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
436
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_thread, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 19, __pyx_L1_error)</span>
|
|
437
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
438
|
+
</pre><pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">020</span>: from types import FunctionType, GenericAlias, MappingProxyType</pre>
|
|
439
|
+
<pre class='cython code score-42 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
440
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
441
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_FunctionType);
|
|
442
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_FunctionType);
|
|
443
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_FunctionType)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>;
|
|
444
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_GenericAlias);
|
|
445
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_GenericAlias);
|
|
446
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 1, __pyx_n_s_GenericAlias)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>;
|
|
447
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_MappingProxyType);
|
|
448
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_MappingProxyType);
|
|
449
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 2, __pyx_n_s_MappingProxyType)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>;
|
|
450
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_types, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
451
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
452
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
453
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_FunctionType);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
454
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
455
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_FunctionType, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
456
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
457
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_GenericAlias);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
458
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
459
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_GenericAlias, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
460
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
461
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_MappingProxyType);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
462
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
463
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_MappingProxyType, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>
|
|
464
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
465
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
466
|
+
</pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">021</span>: from datamodel.types import (</pre>
|
|
467
|
+
<pre class='cython code score-12 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_datamodel_types, __pyx_t_3, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)</span>
|
|
468
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
469
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
470
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_DB_TYPES);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error)</span>
|
|
471
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
472
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_DB_TYPES, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 22, __pyx_L1_error)</span>
|
|
473
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
474
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
475
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">022</span>: DB_TYPES</pre>
|
|
476
|
+
<pre class='cython code score-8 '> __pyx_t_3 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error)</span>
|
|
477
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
478
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_DB_TYPES);
|
|
479
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_DB_TYPES);
|
|
480
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 0, __pyx_n_s_DB_TYPES)) <span class='error_goto'>__PYX_ERR(0, 22, __pyx_L1_error)</span>;
|
|
481
|
+
</pre><pre class="cython line score-0"> <span class="">023</span>: )</pre>
|
|
482
|
+
<pre class="cython line score-0"> <span class="">024</span>: </pre>
|
|
483
|
+
<pre class="cython line score-0"> <span class="">025</span>: </pre>
|
|
484
|
+
<pre class="cython line score-68" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">026</span>: def fields(obj: Any):</pre>
|
|
485
|
+
<pre class='cython code score-68 '>/* Python wrapper */
|
|
486
|
+
static PyObject *__pyx_pw_9datamodel_6fields_1fields(PyObject *__pyx_self,
|
|
487
|
+
#if CYTHON_METH_FASTCALL
|
|
488
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
489
|
+
#else
|
|
490
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
491
|
+
#endif
|
|
492
|
+
); /*proto*/
|
|
493
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_fields, "fields(obj: Any)\nReturn a tuple describing the fields of this dataclass.\n\n Accepts a dataclass or an instance of one. Tuple elements are of\n type Field.\n ");
|
|
494
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_1fields = {"fields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_1fields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_fields};
|
|
495
|
+
static PyObject *__pyx_pw_9datamodel_6fields_1fields(PyObject *__pyx_self,
|
|
496
|
+
#if CYTHON_METH_FASTCALL
|
|
497
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
498
|
+
#else
|
|
499
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
500
|
+
#endif
|
|
501
|
+
) {
|
|
502
|
+
PyObject *__pyx_v_obj = 0;
|
|
503
|
+
#if !CYTHON_METH_FASTCALL
|
|
504
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
505
|
+
#endif
|
|
506
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
507
|
+
PyObject *__pyx_r = 0;
|
|
508
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
509
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("fields (wrapper)", 0);
|
|
510
|
+
#if !CYTHON_METH_FASTCALL
|
|
511
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
512
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
513
|
+
#else
|
|
514
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
515
|
+
#endif
|
|
516
|
+
#endif
|
|
517
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
518
|
+
{
|
|
519
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
|
|
520
|
+
PyObject* values[1] = {0};
|
|
521
|
+
if (__pyx_kwds) {
|
|
522
|
+
Py_ssize_t kw_args;
|
|
523
|
+
switch (__pyx_nargs) {
|
|
524
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
525
|
+
CYTHON_FALLTHROUGH;
|
|
526
|
+
case 0: break;
|
|
527
|
+
default: goto __pyx_L5_argtuple_error;
|
|
528
|
+
}
|
|
529
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
530
|
+
switch (__pyx_nargs) {
|
|
531
|
+
case 0:
|
|
532
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
|
|
533
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
534
|
+
kw_args--;
|
|
535
|
+
}
|
|
536
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
537
|
+
else goto __pyx_L5_argtuple_error;
|
|
538
|
+
}
|
|
539
|
+
if (unlikely(kw_args > 0)) {
|
|
540
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
541
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fields") < 0)) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
542
|
+
}
|
|
543
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
544
|
+
goto __pyx_L5_argtuple_error;
|
|
545
|
+
} else {
|
|
546
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
547
|
+
}
|
|
548
|
+
__pyx_v_obj = values[0];
|
|
549
|
+
}
|
|
550
|
+
goto __pyx_L6_skip;
|
|
551
|
+
__pyx_L5_argtuple_error:;
|
|
552
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("fields", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L3_error)</span>
|
|
553
|
+
__pyx_L6_skip:;
|
|
554
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
555
|
+
__pyx_L3_error:;
|
|
556
|
+
{
|
|
557
|
+
Py_ssize_t __pyx_temp;
|
|
558
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
559
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
563
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
564
|
+
return NULL;
|
|
565
|
+
__pyx_L4_argument_unpacking_done:;
|
|
566
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_fields(__pyx_self, __pyx_v_obj);
|
|
567
|
+
int __pyx_lineno = 0;
|
|
568
|
+
const char *__pyx_filename = NULL;
|
|
569
|
+
int __pyx_clineno = 0;
|
|
570
|
+
|
|
571
|
+
/* function exit code */
|
|
572
|
+
{
|
|
573
|
+
Py_ssize_t __pyx_temp;
|
|
574
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
575
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
579
|
+
return __pyx_r;
|
|
580
|
+
}
|
|
581
|
+
static PyObject *__pyx_gb_9datamodel_6fields_6fields_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
|
|
582
|
+
/* … */
|
|
583
|
+
static PyObject *__pyx_pf_9datamodel_6fields_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
|
|
584
|
+
PyObject *__pyx_v__fields = NULL;
|
|
585
|
+
PyObject *__pyx_v_exc = NULL;
|
|
586
|
+
PyObject *__pyx_gb_9datamodel_6fields_6fields_2generator = 0;
|
|
587
|
+
PyObject *__pyx_r = NULL;
|
|
588
|
+
/* … */
|
|
589
|
+
/* function exit code */
|
|
590
|
+
__pyx_L1_error:;
|
|
591
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
592
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
593
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
|
|
594
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);
|
|
595
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
596
|
+
__pyx_r = NULL;
|
|
597
|
+
__pyx_L0:;
|
|
598
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v__fields);
|
|
599
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_exc);
|
|
600
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_gb_9datamodel_6fields_6fields_2generator);
|
|
601
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
602
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
603
|
+
return __pyx_r;
|
|
604
|
+
}
|
|
605
|
+
/* … */
|
|
606
|
+
__pyx_tuple__10 = <span class='py_c_api'>PyTuple_Pack</span>(5, __pyx_n_s_obj, __pyx_n_s_fields, __pyx_n_s_exc, __pyx_n_s_genexpr, __pyx_n_s_genexpr);<span class='error_goto'> if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
607
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__10);
|
|
608
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__10);
|
|
609
|
+
/* … */
|
|
610
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
611
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
612
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_obj, __pyx_n_s_Any) < 0) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
613
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_1fields, 0, __pyx_n_s_fields_2, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__11));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
614
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
615
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_3, __pyx_t_2);
|
|
616
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
617
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_fields_2, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
618
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
619
|
+
__pyx_codeobj__11 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_fields_2, 26, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 26, __pyx_L1_error)</span>
|
|
620
|
+
</pre><pre class="cython line score-0"> <span class="">027</span>: """Return a tuple describing the fields of this dataclass.</pre>
|
|
621
|
+
<pre class="cython line score-0"> <span class="">028</span>: </pre>
|
|
622
|
+
<pre class="cython line score-0"> <span class="">029</span>: Accepts a dataclass or an instance of one. Tuple elements are of</pre>
|
|
623
|
+
<pre class="cython line score-0"> <span class="">030</span>: type Field.</pre>
|
|
624
|
+
<pre class="cython line score-0"> <span class="">031</span>: """</pre>
|
|
625
|
+
<pre class="cython line score-0"> <span class="">032</span>: # Might it be worth caching this, per class?</pre>
|
|
626
|
+
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: try:</pre>
|
|
627
|
+
<pre class='cython code score-6 '> {
|
|
628
|
+
/*try:*/ {
|
|
629
|
+
/* … */
|
|
630
|
+
}
|
|
631
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
632
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
633
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
634
|
+
goto __pyx_L8_try_end;
|
|
635
|
+
__pyx_L3_error:;
|
|
636
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
637
|
+
/* … */
|
|
638
|
+
__pyx_L5_except_error:;
|
|
639
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1);
|
|
640
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2);
|
|
641
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
|
642
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);
|
|
643
|
+
goto __pyx_L1_error;
|
|
644
|
+
__pyx_L8_try_end:;
|
|
645
|
+
}
|
|
646
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">034</span>: _fields = getattr(obj, '__dataclass_fields__')</pre>
|
|
647
|
+
<pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetAttr</span>(__pyx_v_obj, __pyx_n_u_dataclass_fields);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L3_error)</span>
|
|
648
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
649
|
+
__pyx_v__fields = __pyx_t_4;
|
|
650
|
+
__pyx_t_4 = 0;
|
|
651
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">035</span>: except AttributeError as exc:</pre>
|
|
652
|
+
<pre class='cython code score-19 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_AttributeError);
|
|
653
|
+
if (__pyx_t_5) {
|
|
654
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
655
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 35, __pyx_L5_except_error)</span>
|
|
656
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_4);
|
|
657
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_6);
|
|
658
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_7);
|
|
659
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6);
|
|
660
|
+
__pyx_v_exc = __pyx_t_6;
|
|
661
|
+
/*try:*/ {
|
|
662
|
+
/* … */
|
|
663
|
+
/*finally:*/ {
|
|
664
|
+
__pyx_L14_error:;
|
|
665
|
+
/*exception exit:*/{
|
|
666
|
+
__Pyx_PyThreadState_declare
|
|
667
|
+
__Pyx_PyThreadState_assign
|
|
668
|
+
__pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
|
|
669
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
|
670
|
+
if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
|
|
671
|
+
if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
|
|
672
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_11);
|
|
673
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12);
|
|
674
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13);
|
|
675
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14);
|
|
676
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15);
|
|
677
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16);
|
|
678
|
+
__pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
|
|
679
|
+
{
|
|
680
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_exc); __pyx_v_exc = 0;
|
|
681
|
+
}
|
|
682
|
+
if (PY_MAJOR_VERSION >= 3) {
|
|
683
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14);
|
|
684
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15);
|
|
685
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16);
|
|
686
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16);
|
|
687
|
+
}
|
|
688
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
689
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12);
|
|
690
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13);
|
|
691
|
+
<span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_11, __pyx_t_12, __pyx_t_13);
|
|
692
|
+
__pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
|
|
693
|
+
__pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
|
|
694
|
+
goto __pyx_L5_except_error;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
goto __pyx_L5_except_error;
|
|
699
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">036</span>: raise TypeError(</pre>
|
|
700
|
+
<pre class='cython code score-7 '> __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple_, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 36, __pyx_L14_error)</span>
|
|
701
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);
|
|
702
|
+
/* … */
|
|
703
|
+
__pyx_tuple_ = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_u_must_be_called_with_a_dataclass);<span class='error_goto'> if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
704
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple_);
|
|
705
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple_);
|
|
706
|
+
</pre><pre class="cython line score-0"> <span class="">037</span>: 'must be called with a dataclass type or instance'</pre>
|
|
707
|
+
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">038</span>: ) from exc</pre>
|
|
708
|
+
<pre class='cython code score-3 '> <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_8, 0, 0, __pyx_v_exc);
|
|
709
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
|
710
|
+
<span class='error_goto'>__PYX_ERR(0, 36, __pyx_L14_error)</span>
|
|
711
|
+
}
|
|
712
|
+
</pre><pre class="cython line score-0"> <span class="">039</span>: # Exclude pseudo-fields. Note that fields is sorted by insertion</pre>
|
|
713
|
+
<pre class="cython line score-0"> <span class="">040</span>: # order, so the order of the tuple is as the fields were defined.</pre>
|
|
714
|
+
<pre class="cython line score-48" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">041</span>: return tuple(f for f in _fields.values() if f._field_type is _FIELD)</pre>
|
|
715
|
+
<pre class='cython code score-48 '>static PyObject *__pyx_pf_9datamodel_6fields_6fields_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
|
|
716
|
+
struct __pyx_obj_9datamodel_6fields___pyx_scope_struct__genexpr *__pyx_cur_scope;
|
|
717
|
+
PyObject *__pyx_r = NULL;
|
|
718
|
+
__pyx_cur_scope = (struct __pyx_obj_9datamodel_6fields___pyx_scope_struct__genexpr *)__pyx_tp_new_9datamodel_6fields___pyx_scope_struct__genexpr(__pyx_ptype_9datamodel_6fields___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
|
|
719
|
+
if (unlikely(!__pyx_cur_scope)) {
|
|
720
|
+
__pyx_cur_scope = ((struct __pyx_obj_9datamodel_6fields___pyx_scope_struct__genexpr *)Py_None);
|
|
721
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
722
|
+
<span class='error_goto'>__PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
723
|
+
} else {
|
|
724
|
+
<span class='refnanny'>__Pyx_GOTREF</span>((PyObject *)__pyx_cur_scope);
|
|
725
|
+
}
|
|
726
|
+
__pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
|
|
727
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_cur_scope->__pyx_genexpr_arg_0);
|
|
728
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_cur_scope->__pyx_genexpr_arg_0);
|
|
729
|
+
{
|
|
730
|
+
__pyx_CoroutineObject *gen = <span class='pyx_c_api'>__Pyx_Generator_New</span>((__pyx_coroutine_body_t) __pyx_gb_9datamodel_6fields_6fields_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_fields_locals_genexpr, __pyx_n_s_datamodel_fields);<span class='error_goto'> if (unlikely(!gen)) __PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
731
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_cur_scope);
|
|
732
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
733
|
+
return (PyObject *) gen;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/* function exit code */
|
|
737
|
+
__pyx_L1_error:;
|
|
738
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.fields.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
739
|
+
__pyx_r = NULL;
|
|
740
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>((PyObject *)__pyx_cur_scope);
|
|
741
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
742
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
743
|
+
return __pyx_r;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
static PyObject *__pyx_gb_9datamodel_6fields_6fields_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
|
|
747
|
+
{
|
|
748
|
+
PyObject *__pyx_r = NULL;
|
|
749
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
750
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("genexpr", 0);
|
|
751
|
+
__pyx_L3_first_run:;
|
|
752
|
+
if (unlikely(!__pyx_sent_value)) <span class='error_goto'>__PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
753
|
+
__pyx_t_2 = 0;
|
|
754
|
+
if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>(".0"); <span class='error_goto'>__PYX_ERR(0, 41, __pyx_L1_error)</span> }
|
|
755
|
+
if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) {
|
|
756
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
|
|
757
|
+
<span class='error_goto'>__PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
758
|
+
}
|
|
759
|
+
__pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_genexpr_arg_0, 0, __pyx_n_s_values, (&__pyx_t_3), (&__pyx_t_4));<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
760
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
761
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
762
|
+
__pyx_t_1 = __pyx_t_5;
|
|
763
|
+
__pyx_t_5 = 0;
|
|
764
|
+
while (1) {
|
|
765
|
+
__pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4);
|
|
766
|
+
if (unlikely(__pyx_t_6 == 0)) break;
|
|
767
|
+
if (unlikely(__pyx_t_6 == -1)) <span class='error_goto'>__PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
768
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
769
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_cur_scope->__pyx_v_f);
|
|
770
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_cur_scope->__pyx_v_f, __pyx_t_5);
|
|
771
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
772
|
+
__pyx_t_5 = 0;
|
|
773
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_cur_scope->__pyx_v_f, __pyx_n_s_field_type);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
774
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
775
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_7, __pyx_n_s_FIELD);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
776
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
777
|
+
__pyx_t_8 = (__pyx_t_5 == __pyx_t_7);
|
|
778
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
779
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
780
|
+
if (__pyx_t_8) {
|
|
781
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_cur_scope->__pyx_v_f);
|
|
782
|
+
__pyx_r = __pyx_cur_scope->__pyx_v_f;
|
|
783
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1);
|
|
784
|
+
__pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
|
|
785
|
+
__pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
|
|
786
|
+
__pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
|
|
787
|
+
__pyx_cur_scope->__pyx_t_3 = __pyx_t_4;
|
|
788
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
789
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
790
|
+
<span class='pyx_c_api'>__Pyx_Coroutine_ResetAndClearException</span>(__pyx_generator);
|
|
791
|
+
/* return from generator, yielding value */
|
|
792
|
+
__pyx_generator->resume_label = 1;
|
|
793
|
+
return __pyx_r;
|
|
794
|
+
__pyx_L7_resume_from_yield:;
|
|
795
|
+
__pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
|
|
796
|
+
__pyx_cur_scope->__pyx_t_0 = 0;
|
|
797
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);
|
|
798
|
+
__pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
|
|
799
|
+
__pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
|
|
800
|
+
__pyx_t_4 = __pyx_cur_scope->__pyx_t_3;
|
|
801
|
+
if (unlikely(!__pyx_sent_value)) <span class='error_goto'>__PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
805
|
+
CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
|
|
806
|
+
|
|
807
|
+
/* function exit code */
|
|
808
|
+
<span class='py_c_api'>PyErr_SetNone</span>(PyExc_StopIteration);
|
|
809
|
+
goto __pyx_L0;
|
|
810
|
+
__pyx_L1_error:;
|
|
811
|
+
<span class='pyx_c_api'>__Pyx_Generator_Replace_StopIteration</span>(0);
|
|
812
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
813
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
814
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
|
|
815
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
816
|
+
__pyx_L0:;
|
|
817
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = 0;
|
|
818
|
+
#if !CYTHON_USE_EXC_INFO_STACK
|
|
819
|
+
<span class='pyx_c_api'>__Pyx_Coroutine_ResetAndClearException</span>(__pyx_generator);
|
|
820
|
+
#endif
|
|
821
|
+
__pyx_generator->resume_label = -1;
|
|
822
|
+
<span class='pyx_c_api'>__Pyx_Coroutine_clear</span>((PyObject*)__pyx_generator);
|
|
823
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
824
|
+
return __pyx_r;
|
|
825
|
+
}
|
|
826
|
+
/* … */
|
|
827
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
828
|
+
__pyx_t_7 = __pyx_pf_9datamodel_6fields_6fields_genexpr(NULL, __pyx_v__fields);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
829
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
830
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 41, __pyx_L1_error)</span>
|
|
831
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
832
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
833
|
+
__pyx_r = __pyx_t_6;
|
|
834
|
+
__pyx_t_6 = 0;
|
|
835
|
+
goto __pyx_L0;
|
|
836
|
+
/* … */
|
|
837
|
+
struct __pyx_obj_9datamodel_6fields___pyx_scope_struct__genexpr {
|
|
838
|
+
PyObject_HEAD
|
|
839
|
+
PyObject *__pyx_genexpr_arg_0;
|
|
840
|
+
PyObject *__pyx_v_f;
|
|
841
|
+
PyObject *__pyx_t_0;
|
|
842
|
+
Py_ssize_t __pyx_t_1;
|
|
843
|
+
Py_ssize_t __pyx_t_2;
|
|
844
|
+
int __pyx_t_3;
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
</pre><pre class="cython line score-0"> <span class="">042</span>: </pre>
|
|
848
|
+
<pre class="cython line score-0"> <span class="">043</span>: </pre>
|
|
849
|
+
<pre class="cython line score-0"> <span class="">044</span>: # This function's logic is copied from "recursive_repr" function in</pre>
|
|
850
|
+
<pre class="cython line score-0"> <span class="">045</span>: # reprlib module to avoid dependency.</pre>
|
|
851
|
+
<pre class="cython line score-59" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">046</span>: def _recursive_repr(user_function):</pre>
|
|
852
|
+
<pre class='cython code score-59 '>/* Python wrapper */
|
|
853
|
+
static PyObject *__pyx_pw_9datamodel_6fields_3_recursive_repr(PyObject *__pyx_self,
|
|
854
|
+
#if CYTHON_METH_FASTCALL
|
|
855
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
856
|
+
#else
|
|
857
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
858
|
+
#endif
|
|
859
|
+
); /*proto*/
|
|
860
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_2_recursive_repr, "_recursive_repr(user_function)");
|
|
861
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_3_recursive_repr = {"_recursive_repr", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_3_recursive_repr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_2_recursive_repr};
|
|
862
|
+
static PyObject *__pyx_pw_9datamodel_6fields_3_recursive_repr(PyObject *__pyx_self,
|
|
863
|
+
#if CYTHON_METH_FASTCALL
|
|
864
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
865
|
+
#else
|
|
866
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
867
|
+
#endif
|
|
868
|
+
) {
|
|
869
|
+
PyObject *__pyx_v_user_function = 0;
|
|
870
|
+
#if !CYTHON_METH_FASTCALL
|
|
871
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
872
|
+
#endif
|
|
873
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
874
|
+
PyObject *__pyx_r = 0;
|
|
875
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
876
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_recursive_repr (wrapper)", 0);
|
|
877
|
+
#if !CYTHON_METH_FASTCALL
|
|
878
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
879
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
880
|
+
#else
|
|
881
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
882
|
+
#endif
|
|
883
|
+
#endif
|
|
884
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
885
|
+
{
|
|
886
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_user_function,0};
|
|
887
|
+
PyObject* values[1] = {0};
|
|
888
|
+
if (__pyx_kwds) {
|
|
889
|
+
Py_ssize_t kw_args;
|
|
890
|
+
switch (__pyx_nargs) {
|
|
891
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
892
|
+
CYTHON_FALLTHROUGH;
|
|
893
|
+
case 0: break;
|
|
894
|
+
default: goto __pyx_L5_argtuple_error;
|
|
895
|
+
}
|
|
896
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
897
|
+
switch (__pyx_nargs) {
|
|
898
|
+
case 0:
|
|
899
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_user_function)) != 0)) {
|
|
900
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
901
|
+
kw_args--;
|
|
902
|
+
}
|
|
903
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L3_error)</span>
|
|
904
|
+
else goto __pyx_L5_argtuple_error;
|
|
905
|
+
}
|
|
906
|
+
if (unlikely(kw_args > 0)) {
|
|
907
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
908
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_recursive_repr") < 0)) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L3_error)</span>
|
|
909
|
+
}
|
|
910
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
911
|
+
goto __pyx_L5_argtuple_error;
|
|
912
|
+
} else {
|
|
913
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
914
|
+
}
|
|
915
|
+
__pyx_v_user_function = values[0];
|
|
916
|
+
}
|
|
917
|
+
goto __pyx_L6_skip;
|
|
918
|
+
__pyx_L5_argtuple_error:;
|
|
919
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_recursive_repr", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L3_error)</span>
|
|
920
|
+
__pyx_L6_skip:;
|
|
921
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
922
|
+
__pyx_L3_error:;
|
|
923
|
+
{
|
|
924
|
+
Py_ssize_t __pyx_temp;
|
|
925
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
926
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields._recursive_repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
930
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
931
|
+
return NULL;
|
|
932
|
+
__pyx_L4_argument_unpacking_done:;
|
|
933
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_2_recursive_repr(__pyx_self, __pyx_v_user_function);
|
|
934
|
+
int __pyx_lineno = 0;
|
|
935
|
+
const char *__pyx_filename = NULL;
|
|
936
|
+
int __pyx_clineno = 0;
|
|
937
|
+
|
|
938
|
+
/* function exit code */
|
|
939
|
+
{
|
|
940
|
+
Py_ssize_t __pyx_temp;
|
|
941
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
942
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
946
|
+
return __pyx_r;
|
|
947
|
+
}
|
|
948
|
+
/* … */
|
|
949
|
+
static PyObject *__pyx_pf_9datamodel_6fields_2_recursive_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_user_function) {
|
|
950
|
+
struct __pyx_obj_9datamodel_6fields___pyx_scope_struct_1__recursive_repr *__pyx_cur_scope;
|
|
951
|
+
PyObject *__pyx_v_wrapper = 0;
|
|
952
|
+
PyObject *__pyx_r = NULL;
|
|
953
|
+
__pyx_cur_scope = (struct __pyx_obj_9datamodel_6fields___pyx_scope_struct_1__recursive_repr *)__pyx_tp_new_9datamodel_6fields___pyx_scope_struct_1__recursive_repr(__pyx_ptype_9datamodel_6fields___pyx_scope_struct_1__recursive_repr, __pyx_empty_tuple, NULL);
|
|
954
|
+
if (unlikely(!__pyx_cur_scope)) {
|
|
955
|
+
__pyx_cur_scope = ((struct __pyx_obj_9datamodel_6fields___pyx_scope_struct_1__recursive_repr *)Py_None);
|
|
956
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
957
|
+
<span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
958
|
+
} else {
|
|
959
|
+
<span class='refnanny'>__Pyx_GOTREF</span>((PyObject *)__pyx_cur_scope);
|
|
960
|
+
}
|
|
961
|
+
__pyx_cur_scope->__pyx_v_user_function = __pyx_v_user_function;
|
|
962
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_cur_scope->__pyx_v_user_function);
|
|
963
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_cur_scope->__pyx_v_user_function);
|
|
964
|
+
/* … */
|
|
965
|
+
/* function exit code */
|
|
966
|
+
__pyx_L1_error:;
|
|
967
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
968
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
969
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
970
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
971
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields._recursive_repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
972
|
+
__pyx_r = NULL;
|
|
973
|
+
__pyx_L0:;
|
|
974
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_wrapper);
|
|
975
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>((PyObject *)__pyx_cur_scope);
|
|
976
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
977
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
978
|
+
return __pyx_r;
|
|
979
|
+
}
|
|
980
|
+
/* … */
|
|
981
|
+
__pyx_tuple__12 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_user_function, __pyx_n_s_repr_running, __pyx_n_s_wrapper, __pyx_n_s_wrapper);<span class='error_goto'> if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
982
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__12);
|
|
983
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__12);
|
|
984
|
+
/* … */
|
|
985
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_3_recursive_repr, 0, __pyx_n_s_recursive_repr, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__13));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
986
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
987
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_recursive_repr, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
988
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
989
|
+
__pyx_codeobj__13 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_recursive_repr, 46, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
990
|
+
</pre><pre class="cython line score-0"> <span class="">047</span>: # Decorator to make a repr function return "..." for a recursive</pre>
|
|
991
|
+
<pre class="cython line score-0"> <span class="">048</span>: # call.</pre>
|
|
992
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: repr_running = set()</pre>
|
|
993
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PySet_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)</span>
|
|
994
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
995
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
996
|
+
__pyx_cur_scope->__pyx_v_repr_running = ((PyObject*)__pyx_t_1);
|
|
997
|
+
__pyx_t_1 = 0;
|
|
998
|
+
</pre><pre class="cython line score-0"> <span class="">050</span>: </pre>
|
|
999
|
+
<pre class="cython line score-83" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">051</span>: @wraps(user_function)</pre>
|
|
1000
|
+
<pre class='cython code score-83 '>/* Python wrapper */
|
|
1001
|
+
static PyObject *__pyx_pw_9datamodel_6fields_15_recursive_repr_1wrapper(PyObject *__pyx_self,
|
|
1002
|
+
#if CYTHON_METH_FASTCALL
|
|
1003
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1004
|
+
#else
|
|
1005
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1006
|
+
#endif
|
|
1007
|
+
); /*proto*/
|
|
1008
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_15_recursive_repr_1wrapper = {"wrapper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_15_recursive_repr_1wrapper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
|
|
1009
|
+
static PyObject *__pyx_pw_9datamodel_6fields_15_recursive_repr_1wrapper(PyObject *__pyx_self,
|
|
1010
|
+
#if CYTHON_METH_FASTCALL
|
|
1011
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1012
|
+
#else
|
|
1013
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1014
|
+
#endif
|
|
1015
|
+
) {
|
|
1016
|
+
PyObject *__pyx_v_self = 0;
|
|
1017
|
+
#if !CYTHON_METH_FASTCALL
|
|
1018
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1019
|
+
#endif
|
|
1020
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1021
|
+
PyObject *__pyx_r = 0;
|
|
1022
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1023
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("wrapper (wrapper)", 0);
|
|
1024
|
+
#if !CYTHON_METH_FASTCALL
|
|
1025
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1026
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1027
|
+
#else
|
|
1028
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1029
|
+
#endif
|
|
1030
|
+
#endif
|
|
1031
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1032
|
+
{
|
|
1033
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
1034
|
+
PyObject* values[1] = {0};
|
|
1035
|
+
if (__pyx_kwds) {
|
|
1036
|
+
Py_ssize_t kw_args;
|
|
1037
|
+
switch (__pyx_nargs) {
|
|
1038
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1039
|
+
CYTHON_FALLTHROUGH;
|
|
1040
|
+
case 0: break;
|
|
1041
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1042
|
+
}
|
|
1043
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
1044
|
+
switch (__pyx_nargs) {
|
|
1045
|
+
case 0:
|
|
1046
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
1047
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
1048
|
+
kw_args--;
|
|
1049
|
+
}
|
|
1050
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L3_error)</span>
|
|
1051
|
+
else goto __pyx_L5_argtuple_error;
|
|
1052
|
+
}
|
|
1053
|
+
if (unlikely(kw_args > 0)) {
|
|
1054
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
1055
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wrapper") < 0)) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L3_error)</span>
|
|
1056
|
+
}
|
|
1057
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
1058
|
+
goto __pyx_L5_argtuple_error;
|
|
1059
|
+
} else {
|
|
1060
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1061
|
+
}
|
|
1062
|
+
__pyx_v_self = values[0];
|
|
1063
|
+
}
|
|
1064
|
+
goto __pyx_L6_skip;
|
|
1065
|
+
__pyx_L5_argtuple_error:;
|
|
1066
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("wrapper", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L3_error)</span>
|
|
1067
|
+
__pyx_L6_skip:;
|
|
1068
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1069
|
+
__pyx_L3_error:;
|
|
1070
|
+
{
|
|
1071
|
+
Py_ssize_t __pyx_temp;
|
|
1072
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1073
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields._recursive_repr.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1077
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1078
|
+
return NULL;
|
|
1079
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1080
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_15_recursive_repr_wrapper(__pyx_self, __pyx_v_self);
|
|
1081
|
+
int __pyx_lineno = 0;
|
|
1082
|
+
const char *__pyx_filename = NULL;
|
|
1083
|
+
int __pyx_clineno = 0;
|
|
1084
|
+
|
|
1085
|
+
/* function exit code */
|
|
1086
|
+
{
|
|
1087
|
+
Py_ssize_t __pyx_temp;
|
|
1088
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1089
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1093
|
+
return __pyx_r;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
static PyObject *__pyx_pf_9datamodel_6fields_15_recursive_repr_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
1097
|
+
struct __pyx_obj_9datamodel_6fields___pyx_scope_struct_1__recursive_repr *__pyx_cur_scope;
|
|
1098
|
+
struct __pyx_obj_9datamodel_6fields___pyx_scope_struct_1__recursive_repr *__pyx_outer_scope;
|
|
1099
|
+
PyObject *__pyx_v_key = NULL;
|
|
1100
|
+
PyObject *__pyx_v_result = NULL;
|
|
1101
|
+
PyObject *__pyx_r = NULL;
|
|
1102
|
+
__pyx_outer_scope = (struct __pyx_obj_9datamodel_6fields___pyx_scope_struct_1__recursive_repr *) <span class='pyx_c_api'>__Pyx_CyFunction_GetClosure</span>(__pyx_self);
|
|
1103
|
+
__pyx_cur_scope = __pyx_outer_scope;
|
|
1104
|
+
/* … */
|
|
1105
|
+
/* function exit code */
|
|
1106
|
+
__pyx_L1_error:;
|
|
1107
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1108
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
1109
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
1110
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
1111
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields._recursive_repr.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1112
|
+
__pyx_r = NULL;
|
|
1113
|
+
__pyx_L0:;
|
|
1114
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_key);
|
|
1115
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result);
|
|
1116
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1117
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1118
|
+
return __pyx_r;
|
|
1119
|
+
}
|
|
1120
|
+
/* … */
|
|
1121
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_wraps);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
1122
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1123
|
+
__pyx_t_4 = NULL;
|
|
1124
|
+
__pyx_t_5 = 0;
|
|
1125
|
+
#if CYTHON_UNPACK_METHODS
|
|
1126
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) {
|
|
1127
|
+
__pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3);
|
|
1128
|
+
if (likely(__pyx_t_4)) {
|
|
1129
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3);
|
|
1130
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4);
|
|
1131
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1132
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function);
|
|
1133
|
+
__pyx_t_5 = 1;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
#endif
|
|
1137
|
+
{
|
|
1138
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_user_function};
|
|
1139
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
1140
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1141
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
1142
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1143
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1144
|
+
}
|
|
1145
|
+
/* … */
|
|
1146
|
+
__pyx_tuple__3 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_result);<span class='error_goto'> if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
1147
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__3);
|
|
1148
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__3);
|
|
1149
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_15_recursive_repr_1wrapper, 0, __pyx_n_s_recursive_repr_locals_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__4));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
1150
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1151
|
+
__pyx_t_4 = NULL;
|
|
1152
|
+
__pyx_t_5 = 0;
|
|
1153
|
+
#if CYTHON_UNPACK_METHODS
|
|
1154
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
|
1155
|
+
__pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
|
1156
|
+
if (likely(__pyx_t_4)) {
|
|
1157
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
|
1158
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4);
|
|
1159
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1160
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
|
1161
|
+
__pyx_t_5 = 1;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
#endif
|
|
1165
|
+
{
|
|
1166
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
|
|
1167
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
1168
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1169
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1170
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
1171
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1172
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1173
|
+
}
|
|
1174
|
+
__pyx_v_wrapper = __pyx_t_1;
|
|
1175
|
+
__pyx_t_1 = 0;
|
|
1176
|
+
__pyx_codeobj__4 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_wrapper, 51, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
1177
|
+
</pre><pre class="cython line score-0"> <span class="">052</span>: def wrapper(self):</pre>
|
|
1178
|
+
<pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: key = id(self), _thread.get_ident()</pre>
|
|
1179
|
+
<pre class='cython code score-30 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_id, __pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
1180
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1181
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_thread);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
1182
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1183
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_get_ident);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
1184
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1185
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1186
|
+
__pyx_t_3 = NULL;
|
|
1187
|
+
__pyx_t_5 = 0;
|
|
1188
|
+
#if CYTHON_UNPACK_METHODS
|
|
1189
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) {
|
|
1190
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4);
|
|
1191
|
+
if (likely(__pyx_t_3)) {
|
|
1192
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4);
|
|
1193
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
1194
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1195
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function);
|
|
1196
|
+
__pyx_t_5 = 1;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
#endif
|
|
1200
|
+
{
|
|
1201
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
|
|
1202
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
|
|
1203
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1204
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
1205
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1206
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1207
|
+
}
|
|
1208
|
+
__pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
1209
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1210
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
1211
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 53, __pyx_L1_error)</span>;
|
|
1212
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
|
|
1213
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_4, 1, __pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 53, __pyx_L1_error)</span>;
|
|
1214
|
+
__pyx_t_1 = 0;
|
|
1215
|
+
__pyx_t_2 = 0;
|
|
1216
|
+
__pyx_v_key = ((PyObject*)__pyx_t_4);
|
|
1217
|
+
__pyx_t_4 = 0;
|
|
1218
|
+
</pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">054</span>: if key in repr_running:</pre>
|
|
1219
|
+
<pre class='cython code score-9 '> if (unlikely(!__pyx_cur_scope->__pyx_v_repr_running)) { <span class='pyx_c_api'>__Pyx_RaiseClosureNameError</span>("repr_running"); <span class='error_goto'>__PYX_ERR(0, 54, __pyx_L1_error)</span> }
|
|
1220
|
+
if (unlikely(__pyx_cur_scope->__pyx_v_repr_running == Py_None)) {
|
|
1221
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
1222
|
+
<span class='error_goto'>__PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
1223
|
+
}
|
|
1224
|
+
__pyx_t_6 = (<span class='pyx_c_api'>__Pyx_PySet_ContainsTF</span>(__pyx_v_key, __pyx_cur_scope->__pyx_v_repr_running, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) <span class='error_goto'>__PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
1225
|
+
if (__pyx_t_6) {
|
|
1226
|
+
/* … */
|
|
1227
|
+
}
|
|
1228
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">055</span>: return '...'</pre>
|
|
1229
|
+
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1230
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__2);
|
|
1231
|
+
__pyx_r = __pyx_kp_u__2;
|
|
1232
|
+
goto __pyx_L0;
|
|
1233
|
+
</pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: repr_running.add(key)</pre>
|
|
1234
|
+
<pre class='cython code score-12 '> if (unlikely(!__pyx_cur_scope->__pyx_v_repr_running)) { <span class='pyx_c_api'>__Pyx_RaiseClosureNameError</span>("repr_running"); <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span> }
|
|
1235
|
+
if (unlikely(__pyx_cur_scope->__pyx_v_repr_running == Py_None)) {
|
|
1236
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
|
|
1237
|
+
<span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>
|
|
1238
|
+
}
|
|
1239
|
+
__pyx_t_7 = <span class='py_c_api'>PySet_Add</span>(__pyx_cur_scope->__pyx_v_repr_running, __pyx_v_key);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 56, __pyx_L1_error)</span>
|
|
1240
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">057</span>: try:</pre>
|
|
1241
|
+
<pre class='cython code score-0 '> /*try:*/ {
|
|
1242
|
+
</pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">058</span>: result = user_function(self)</pre>
|
|
1243
|
+
<pre class='cython code score-17 '> if (unlikely(!__pyx_cur_scope->__pyx_v_user_function)) { <span class='pyx_c_api'>__Pyx_RaiseClosureNameError</span>("user_function"); <span class='error_goto'>__PYX_ERR(0, 58, __pyx_L5_error)</span> }
|
|
1244
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_cur_scope->__pyx_v_user_function);
|
|
1245
|
+
__pyx_t_2 = __pyx_cur_scope->__pyx_v_user_function; __pyx_t_1 = NULL;
|
|
1246
|
+
__pyx_t_5 = 0;
|
|
1247
|
+
#if CYTHON_UNPACK_METHODS
|
|
1248
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
|
1249
|
+
__pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
|
1250
|
+
if (likely(__pyx_t_1)) {
|
|
1251
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
|
1252
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
|
1253
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1254
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
|
1255
|
+
__pyx_t_5 = 1;
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
#endif
|
|
1259
|
+
{
|
|
1260
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_self};
|
|
1261
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
1262
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1263
|
+
if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 58, __pyx_L5_error)</span>
|
|
1264
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1265
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1266
|
+
}
|
|
1267
|
+
__pyx_v_result = __pyx_t_4;
|
|
1268
|
+
__pyx_t_4 = 0;
|
|
1269
|
+
}
|
|
1270
|
+
</pre><pre class="cython line score-0"> <span class="">059</span>: finally:</pre>
|
|
1271
|
+
<pre class="cython line score-37" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">060</span>: repr_running.discard(key)</pre>
|
|
1272
|
+
<pre class='cython code score-37 '> /*finally:*/ {
|
|
1273
|
+
/*normal exit:*/{
|
|
1274
|
+
if (unlikely(!__pyx_cur_scope->__pyx_v_repr_running)) { <span class='pyx_c_api'>__Pyx_RaiseClosureNameError</span>("repr_running"); <span class='error_goto'>__PYX_ERR(0, 60, __pyx_L1_error)</span> }
|
|
1275
|
+
if (unlikely(__pyx_cur_scope->__pyx_v_repr_running == Py_None)) {
|
|
1276
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard");
|
|
1277
|
+
<span class='error_goto'>__PYX_ERR(0, 60, __pyx_L1_error)</span>
|
|
1278
|
+
}
|
|
1279
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PySet_Discard</span>(__pyx_cur_scope->__pyx_v_repr_running, __pyx_v_key);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 60, __pyx_L1_error)</span>
|
|
1280
|
+
goto __pyx_L6;
|
|
1281
|
+
}
|
|
1282
|
+
__pyx_L5_error:;
|
|
1283
|
+
/*exception exit:*/{
|
|
1284
|
+
__Pyx_PyThreadState_declare
|
|
1285
|
+
__Pyx_PyThreadState_assign
|
|
1286
|
+
__pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
|
|
1287
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1288
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1289
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1290
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1291
|
+
if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
|
|
1292
|
+
if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
|
|
1293
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_11);
|
|
1294
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12);
|
|
1295
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13);
|
|
1296
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14);
|
|
1297
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15);
|
|
1298
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16);
|
|
1299
|
+
__pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
|
|
1300
|
+
{
|
|
1301
|
+
if (unlikely(!__pyx_cur_scope->__pyx_v_repr_running)) { <span class='pyx_c_api'>__Pyx_RaiseClosureNameError</span>("repr_running"); <span class='error_goto'>__PYX_ERR(0, 60, __pyx_L8_error)</span> }
|
|
1302
|
+
if (unlikely(__pyx_cur_scope->__pyx_v_repr_running == Py_None)) {
|
|
1303
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard");
|
|
1304
|
+
<span class='error_goto'>__PYX_ERR(0, 60, __pyx_L8_error)</span>
|
|
1305
|
+
}
|
|
1306
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PySet_Discard</span>(__pyx_cur_scope->__pyx_v_repr_running, __pyx_v_key);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 60, __pyx_L8_error)</span>
|
|
1307
|
+
}
|
|
1308
|
+
if (PY_MAJOR_VERSION >= 3) {
|
|
1309
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14);
|
|
1310
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15);
|
|
1311
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16);
|
|
1312
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16);
|
|
1313
|
+
}
|
|
1314
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
1315
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12);
|
|
1316
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13);
|
|
1317
|
+
<span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_11, __pyx_t_12, __pyx_t_13);
|
|
1318
|
+
__pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
|
|
1319
|
+
__pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
|
|
1320
|
+
goto __pyx_L1_error;
|
|
1321
|
+
__pyx_L8_error:;
|
|
1322
|
+
if (PY_MAJOR_VERSION >= 3) {
|
|
1323
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14);
|
|
1324
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15);
|
|
1325
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16);
|
|
1326
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16);
|
|
1327
|
+
}
|
|
1328
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0;
|
|
1329
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0;
|
|
1330
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0;
|
|
1331
|
+
__pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
|
|
1332
|
+
goto __pyx_L1_error;
|
|
1333
|
+
}
|
|
1334
|
+
__pyx_L6:;
|
|
1335
|
+
}
|
|
1336
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">061</span>: return result</pre>
|
|
1337
|
+
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1338
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result);
|
|
1339
|
+
__pyx_r = __pyx_v_result;
|
|
1340
|
+
goto __pyx_L0;
|
|
1341
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">062</span>: return wrapper</pre>
|
|
1342
|
+
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1343
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_wrapper);
|
|
1344
|
+
__pyx_r = __pyx_v_wrapper;
|
|
1345
|
+
goto __pyx_L0;
|
|
1346
|
+
</pre><pre class="cython line score-0"> <span class="">063</span>: </pre>
|
|
1347
|
+
<pre class="cython line score-0"> <span class="">064</span>: </pre>
|
|
1348
|
+
<pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">065</span>: class Field(ff):</pre>
|
|
1349
|
+
<pre class='cython code score-26 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_ff);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1350
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1351
|
+
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1352
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1353
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
|
|
1354
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 65, __pyx_L1_error)</span>;
|
|
1355
|
+
__pyx_t_3 = 0;
|
|
1356
|
+
__pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1357
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1358
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_CalculateMetaclass</span>(NULL, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1359
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1360
|
+
__pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_Field, __pyx_n_s_Field, (PyObject *) NULL, __pyx_n_s_datamodel_fields, __pyx_kp_s_Field_description_Extending_Fie);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1361
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1362
|
+
if (__pyx_t_3 != __pyx_t_2) {
|
|
1363
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItemString</span>(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) <span class='error_goto'>__PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1364
|
+
}
|
|
1365
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1366
|
+
/* … */
|
|
1367
|
+
__pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Field, __pyx_t_3, __pyx_t_5, NULL, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1368
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1369
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Field, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1370
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1371
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
1372
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1373
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1374
|
+
</pre><pre class="cython line score-0"> <span class="">066</span>: """</pre>
|
|
1375
|
+
<pre class="cython line score-0"> <span class="">067</span>: Field.</pre>
|
|
1376
|
+
<pre class="cython line score-0"> <span class="">068</span>: description: Extending Field definition from Dataclass Field to DataModel.</pre>
|
|
1377
|
+
<pre class="cython line score-0"> <span class="">069</span>: """</pre>
|
|
1378
|
+
<pre class="cython line score-0"> <span class="">070</span>: </pre>
|
|
1379
|
+
<pre class="cython line score-0"> <span class="">071</span>: __slots__ = (</pre>
|
|
1380
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">072</span>: 'is_dc',</pre>
|
|
1381
|
+
<pre class='cython code score-7 '> if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_slots, __pyx_tuple__14) < 0) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span>
|
|
1382
|
+
/* … */
|
|
1383
|
+
__pyx_tuple__14 = <span class='py_c_api'>PyTuple_Pack</span>(41, __pyx_n_u_is_dc, __pyx_n_u_is_primitive, __pyx_n_u_is_typing, __pyx_n_u_origin, __pyx_n_u_args, __pyx_n_u_type_args, __pyx_n_u_name, __pyx_n_u_type, __pyx_n_u_type_category, __pyx_n_u_description, __pyx_n_u_default, __pyx_n_u_default_factory, __pyx_n_u_typeinfo, __pyx_n_u_repr, __pyx_n_u_hash, __pyx_n_u_init, __pyx_n_u_compare, __pyx_n_u_metadata, __pyx_n_u_meta, __pyx_n_u_kw_only, __pyx_n_u_field_type, __pyx_n_u_typing_args, __pyx_n_u_inner_origin, __pyx_n_u_inner_type, __pyx_n_u_inner_is_dc, __pyx_n_u_validator, __pyx_n_u_required_2, __pyx_n_u_nullable_2, __pyx_n_u_primary, __pyx_n_u_dbtype, __pyx_n_u_alias_2, __pyx_n_u_pattern_2, __pyx_n_u_gt, __pyx_n_u_eq, __pyx_n_u_lt, __pyx_n_u_le, __pyx_n_u_ge, __pyx_n_u_schema_extra, __pyx_n_u_alias, __pyx_n_u_encoder_fn, __pyx_n_u_parser);<span class='error_goto'> if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 72, __pyx_L1_error)</span>
|
|
1384
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__14);
|
|
1385
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__14);
|
|
1386
|
+
</pre><pre class="cython line score-0"> <span class="">073</span>: 'is_primitive',</pre>
|
|
1387
|
+
<pre class="cython line score-0"> <span class="">074</span>: 'is_typing',</pre>
|
|
1388
|
+
<pre class="cython line score-0"> <span class="">075</span>: 'origin',</pre>
|
|
1389
|
+
<pre class="cython line score-0"> <span class="">076</span>: 'args',</pre>
|
|
1390
|
+
<pre class="cython line score-0"> <span class="">077</span>: 'type_args',</pre>
|
|
1391
|
+
<pre class="cython line score-0"> <span class="">078</span>: 'name',</pre>
|
|
1392
|
+
<pre class="cython line score-0"> <span class="">079</span>: 'type',</pre>
|
|
1393
|
+
<pre class="cython line score-0"> <span class="">080</span>: '_type_category',</pre>
|
|
1394
|
+
<pre class="cython line score-0"> <span class="">081</span>: 'description',</pre>
|
|
1395
|
+
<pre class="cython line score-0"> <span class="">082</span>: 'default',</pre>
|
|
1396
|
+
<pre class="cython line score-0"> <span class="">083</span>: 'default_factory',</pre>
|
|
1397
|
+
<pre class="cython line score-0"> <span class="">084</span>: '_typeinfo_',</pre>
|
|
1398
|
+
<pre class="cython line score-0"> <span class="">085</span>: 'repr',</pre>
|
|
1399
|
+
<pre class="cython line score-0"> <span class="">086</span>: 'hash',</pre>
|
|
1400
|
+
<pre class="cython line score-0"> <span class="">087</span>: 'init',</pre>
|
|
1401
|
+
<pre class="cython line score-0"> <span class="">088</span>: 'compare',</pre>
|
|
1402
|
+
<pre class="cython line score-0"> <span class="">089</span>: 'metadata',</pre>
|
|
1403
|
+
<pre class="cython line score-0"> <span class="">090</span>: '_meta',</pre>
|
|
1404
|
+
<pre class="cython line score-0"> <span class="">091</span>: 'kw_only',</pre>
|
|
1405
|
+
<pre class="cython line score-0"> <span class="">092</span>: '_field_type', # Private: not to be used by user code.</pre>
|
|
1406
|
+
<pre class="cython line score-0"> <span class="">093</span>: '_typing_args',</pre>
|
|
1407
|
+
<pre class="cython line score-0"> <span class="">094</span>: '_inner_origin',</pre>
|
|
1408
|
+
<pre class="cython line score-0"> <span class="">095</span>: '_inner_type',</pre>
|
|
1409
|
+
<pre class="cython line score-0"> <span class="">096</span>: '_inner_is_dc',</pre>
|
|
1410
|
+
<pre class="cython line score-0"> <span class="">097</span>: 'validator',</pre>
|
|
1411
|
+
<pre class="cython line score-0"> <span class="">098</span>: '_required',</pre>
|
|
1412
|
+
<pre class="cython line score-0"> <span class="">099</span>: '_nullable',</pre>
|
|
1413
|
+
<pre class="cython line score-0"> <span class="">100</span>: '_primary',</pre>
|
|
1414
|
+
<pre class="cython line score-0"> <span class="">101</span>: '_dbtype',</pre>
|
|
1415
|
+
<pre class="cython line score-0"> <span class="">102</span>: '_alias',</pre>
|
|
1416
|
+
<pre class="cython line score-0"> <span class="">103</span>: '_pattern',</pre>
|
|
1417
|
+
<pre class="cython line score-0"> <span class="">104</span>: 'gt',</pre>
|
|
1418
|
+
<pre class="cython line score-0"> <span class="">105</span>: 'eq',</pre>
|
|
1419
|
+
<pre class="cython line score-0"> <span class="">106</span>: 'lt',</pre>
|
|
1420
|
+
<pre class="cython line score-0"> <span class="">107</span>: 'le',</pre>
|
|
1421
|
+
<pre class="cython line score-0"> <span class="">108</span>: 'ge',</pre>
|
|
1422
|
+
<pre class="cython line score-0"> <span class="">109</span>: 'schema_extra',</pre>
|
|
1423
|
+
<pre class="cython line score-0"> <span class="">110</span>: 'alias',</pre>
|
|
1424
|
+
<pre class="cython line score-0"> <span class="">111</span>: '_encoder_fn',</pre>
|
|
1425
|
+
<pre class="cython line score-0"> <span class="">112</span>: 'parser'</pre>
|
|
1426
|
+
<pre class="cython line score-0"> <span class="">113</span>: )</pre>
|
|
1427
|
+
<pre class="cython line score-0"> <span class="">114</span>: </pre>
|
|
1428
|
+
<pre class="cython line score-104" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">115</span>: def __init__(</pre>
|
|
1429
|
+
<pre class='cython code score-104 '>/* Python wrapper */
|
|
1430
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_1__init__(PyObject *__pyx_self,
|
|
1431
|
+
#if CYTHON_METH_FASTCALL
|
|
1432
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1433
|
+
#else
|
|
1434
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1435
|
+
#endif
|
|
1436
|
+
); /*proto*/
|
|
1437
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field___init__, "Field.__init__(self, default: Optional[Union[Any, Callable]] = None, nullable: bool = True, required: bool = False, factory: Optional[Callable] = None, min: Union[int, float] = None, max: Union[int, float] = None, validator: Optional[Callable] = None, unicode pattern: Optional[str] = None, unicode alias: Optional[str] = None, kw_only: bool = False, **kwargs)");
|
|
1438
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field___init__};
|
|
1439
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_1__init__(PyObject *__pyx_self,
|
|
1440
|
+
#if CYTHON_METH_FASTCALL
|
|
1441
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1442
|
+
#else
|
|
1443
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1444
|
+
#endif
|
|
1445
|
+
) {
|
|
1446
|
+
PyObject *__pyx_v_self = 0;
|
|
1447
|
+
PyObject *__pyx_v_default = 0;
|
|
1448
|
+
PyObject *__pyx_v_nullable = 0;
|
|
1449
|
+
PyObject *__pyx_v_required = 0;
|
|
1450
|
+
PyObject *__pyx_v_factory = 0;
|
|
1451
|
+
PyObject *__pyx_v_min = 0;
|
|
1452
|
+
PyObject *__pyx_v_max = 0;
|
|
1453
|
+
PyObject *__pyx_v_validator = 0;
|
|
1454
|
+
PyObject *__pyx_v_pattern = 0;
|
|
1455
|
+
PyObject *__pyx_v_alias = 0;
|
|
1456
|
+
PyObject *__pyx_v_kw_only = 0;
|
|
1457
|
+
PyObject *__pyx_v_kwargs = 0;
|
|
1458
|
+
#if !CYTHON_METH_FASTCALL
|
|
1459
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1460
|
+
#endif
|
|
1461
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1462
|
+
PyObject *__pyx_r = 0;
|
|
1463
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1464
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0);
|
|
1465
|
+
#if !CYTHON_METH_FASTCALL
|
|
1466
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1467
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1468
|
+
#else
|
|
1469
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1470
|
+
#endif
|
|
1471
|
+
#endif
|
|
1472
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1473
|
+
__pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
1474
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs);
|
|
1475
|
+
{
|
|
1476
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_nullable,&__pyx_n_s_required,&__pyx_n_s_factory,&__pyx_n_s_min,&__pyx_n_s_max,&__pyx_n_s_validator,&__pyx_n_s_pattern,&__pyx_n_s_alias,&__pyx_n_s_kw_only,0};
|
|
1477
|
+
PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
|
|
1478
|
+
/* … */
|
|
1479
|
+
/* function exit code */
|
|
1480
|
+
goto __pyx_L0;
|
|
1481
|
+
__pyx_L1_error:;
|
|
1482
|
+
__pyx_r = NULL;
|
|
1483
|
+
__pyx_L0:;
|
|
1484
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs);
|
|
1485
|
+
{
|
|
1486
|
+
Py_ssize_t __pyx_temp;
|
|
1487
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1488
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1492
|
+
return __pyx_r;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_nullable, PyObject *__pyx_v_required, PyObject *__pyx_v_factory, PyObject *__pyx_v_min, PyObject *__pyx_v_max, PyObject *__pyx_v_validator, PyObject *__pyx_v_pattern, PyObject *__pyx_v_alias, PyObject *__pyx_v_kw_only, PyObject *__pyx_v_kwargs) {
|
|
1496
|
+
PyObject *__pyx_v_meta = NULL;
|
|
1497
|
+
PyObject *__pyx_v__range = NULL;
|
|
1498
|
+
PyObject *__pyx_v_metadata = NULL;
|
|
1499
|
+
PyObject *__pyx_v_default_factory = NULL;
|
|
1500
|
+
PyObject *__pyx_v_args = NULL;
|
|
1501
|
+
PyObject *__pyx_r = NULL;
|
|
1502
|
+
/* … */
|
|
1503
|
+
/* function exit code */
|
|
1504
|
+
__pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
1505
|
+
goto __pyx_L0;
|
|
1506
|
+
__pyx_L1_error:;
|
|
1507
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1508
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
1509
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
1510
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
1511
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
|
|
1512
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1513
|
+
__pyx_r = NULL;
|
|
1514
|
+
__pyx_L0:;
|
|
1515
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_meta);
|
|
1516
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v__range);
|
|
1517
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_metadata);
|
|
1518
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_default_factory);
|
|
1519
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args);
|
|
1520
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1521
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1522
|
+
return __pyx_r;
|
|
1523
|
+
}
|
|
1524
|
+
/* … */
|
|
1525
|
+
__pyx_tuple__15 = <span class='py_c_api'>PyTuple_Pack</span>(17, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_nullable, __pyx_n_s_required, __pyx_n_s_factory, __pyx_n_s_min, __pyx_n_s_max, __pyx_n_s_validator, __pyx_n_s_pattern, __pyx_n_s_alias, __pyx_n_s_kw_only, __pyx_n_s_kwargs, __pyx_n_s_meta_2, __pyx_n_s_range, __pyx_n_s_metadata, __pyx_n_s_default_factory, __pyx_n_s_args);<span class='error_goto'> if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1526
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__15);
|
|
1527
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__15);
|
|
1528
|
+
__pyx_codeobj__16 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(11, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_init_2, 115, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1529
|
+
/* … */
|
|
1530
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(10);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1531
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1532
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_default, __pyx_kp_s_Optional_Union_Any_Callable) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1533
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_nullable, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1534
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_required, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1535
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_factory, __pyx_kp_s_Optional_Callable) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1536
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_min, __pyx_kp_s_Union_int_float) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1537
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_max, __pyx_kp_s_Union_int_float) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1538
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_validator, __pyx_kp_s_Optional_Callable) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1539
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_pattern, __pyx_kp_s_Optional_str) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1540
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_alias, __pyx_kp_s_Optional_str) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1541
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_kw_only, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1542
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_1__init__, 0, __pyx_n_s_Field___init, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__16));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1543
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1544
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_6, __pyx_tuple__17);
|
|
1545
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_6, __pyx_t_2);
|
|
1546
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1547
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_init_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1548
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1549
|
+
__pyx_tuple__17 = <span class='py_c_api'>PyTuple_Pack</span>(10, Py_None, ((PyObject *)Py_True), ((PyObject *)Py_False), Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, ((PyObject *)Py_False));<span class='error_goto'> if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 115, __pyx_L1_error)</span>
|
|
1550
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__17);
|
|
1551
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__17);
|
|
1552
|
+
</pre><pre class="cython line score-0"> <span class="">116</span>: self,</pre>
|
|
1553
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">117</span>: default: Optional[Union[Any, Callable]] = None,</pre>
|
|
1554
|
+
<pre class='cython code score-2 '> values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
1555
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">118</span>: nullable: bool = True,</pre>
|
|
1556
|
+
<pre class='cython code score-2 '> values[2] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)((PyObject *)Py_True)));
|
|
1557
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">119</span>: required: bool = False,</pre>
|
|
1558
|
+
<pre class='cython code score-2 '> values[3] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)((PyObject *)Py_False)));
|
|
1559
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">120</span>: factory: Optional[Callable] = None,</pre>
|
|
1560
|
+
<pre class='cython code score-2 '> values[4] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
1561
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">121</span>: min: Union[int, float] = None,</pre>
|
|
1562
|
+
<pre class='cython code score-2 '> values[5] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
1563
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">122</span>: max: Union[int, float] = None,</pre>
|
|
1564
|
+
<pre class='cython code score-2 '> values[6] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
1565
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">123</span>: validator: Optional[Callable] = None,</pre>
|
|
1566
|
+
<pre class='cython code score-2 '> values[7] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
1567
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">124</span>: pattern: Optional[str] = None,</pre>
|
|
1568
|
+
<pre class='cython code score-2 '> values[8] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject*)Py_None));
|
|
1569
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">125</span>: alias: Optional[str] = None,</pre>
|
|
1570
|
+
<pre class='cython code score-2 '> values[9] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject*)Py_None));
|
|
1571
|
+
</pre><pre class="cython line score-160" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">126</span>: kw_only: bool = False,</pre>
|
|
1572
|
+
<pre class='cython code score-160 '> values[10] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)((PyObject *)Py_False)));
|
|
1573
|
+
if (__pyx_kwds) {
|
|
1574
|
+
Py_ssize_t kw_args;
|
|
1575
|
+
switch (__pyx_nargs) {
|
|
1576
|
+
case 11: values[10] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 10);
|
|
1577
|
+
CYTHON_FALLTHROUGH;
|
|
1578
|
+
case 10: values[9] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 9);
|
|
1579
|
+
CYTHON_FALLTHROUGH;
|
|
1580
|
+
case 9: values[8] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 8);
|
|
1581
|
+
CYTHON_FALLTHROUGH;
|
|
1582
|
+
case 8: values[7] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 7);
|
|
1583
|
+
CYTHON_FALLTHROUGH;
|
|
1584
|
+
case 7: values[6] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 6);
|
|
1585
|
+
CYTHON_FALLTHROUGH;
|
|
1586
|
+
case 6: values[5] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 5);
|
|
1587
|
+
CYTHON_FALLTHROUGH;
|
|
1588
|
+
case 5: values[4] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 4);
|
|
1589
|
+
CYTHON_FALLTHROUGH;
|
|
1590
|
+
case 4: values[3] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 3);
|
|
1591
|
+
CYTHON_FALLTHROUGH;
|
|
1592
|
+
case 3: values[2] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 2);
|
|
1593
|
+
CYTHON_FALLTHROUGH;
|
|
1594
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
1595
|
+
CYTHON_FALLTHROUGH;
|
|
1596
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1597
|
+
CYTHON_FALLTHROUGH;
|
|
1598
|
+
case 0: break;
|
|
1599
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1600
|
+
}
|
|
1601
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
1602
|
+
switch (__pyx_nargs) {
|
|
1603
|
+
case 0:
|
|
1604
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
1605
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
1606
|
+
kw_args--;
|
|
1607
|
+
}
|
|
1608
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1609
|
+
else goto __pyx_L5_argtuple_error;
|
|
1610
|
+
CYTHON_FALLTHROUGH;
|
|
1611
|
+
case 1:
|
|
1612
|
+
if (kw_args > 0) {
|
|
1613
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
|
|
1614
|
+
if (value) { values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1615
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1616
|
+
}
|
|
1617
|
+
CYTHON_FALLTHROUGH;
|
|
1618
|
+
case 2:
|
|
1619
|
+
if (kw_args > 0) {
|
|
1620
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nullable);
|
|
1621
|
+
if (value) { values[2] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1622
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1623
|
+
}
|
|
1624
|
+
CYTHON_FALLTHROUGH;
|
|
1625
|
+
case 3:
|
|
1626
|
+
if (kw_args > 0) {
|
|
1627
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_required);
|
|
1628
|
+
if (value) { values[3] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1629
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1630
|
+
}
|
|
1631
|
+
CYTHON_FALLTHROUGH;
|
|
1632
|
+
case 4:
|
|
1633
|
+
if (kw_args > 0) {
|
|
1634
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_factory);
|
|
1635
|
+
if (value) { values[4] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1636
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1637
|
+
}
|
|
1638
|
+
CYTHON_FALLTHROUGH;
|
|
1639
|
+
case 5:
|
|
1640
|
+
if (kw_args > 0) {
|
|
1641
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min);
|
|
1642
|
+
if (value) { values[5] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1643
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1644
|
+
}
|
|
1645
|
+
CYTHON_FALLTHROUGH;
|
|
1646
|
+
case 6:
|
|
1647
|
+
if (kw_args > 0) {
|
|
1648
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max);
|
|
1649
|
+
if (value) { values[6] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1650
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1651
|
+
}
|
|
1652
|
+
CYTHON_FALLTHROUGH;
|
|
1653
|
+
case 7:
|
|
1654
|
+
if (kw_args > 0) {
|
|
1655
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_validator);
|
|
1656
|
+
if (value) { values[7] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1657
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1658
|
+
}
|
|
1659
|
+
CYTHON_FALLTHROUGH;
|
|
1660
|
+
case 8:
|
|
1661
|
+
if (kw_args > 0) {
|
|
1662
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pattern);
|
|
1663
|
+
if (value) { values[8] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1664
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1665
|
+
}
|
|
1666
|
+
CYTHON_FALLTHROUGH;
|
|
1667
|
+
case 9:
|
|
1668
|
+
if (kw_args > 0) {
|
|
1669
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alias);
|
|
1670
|
+
if (value) { values[9] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1671
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1672
|
+
}
|
|
1673
|
+
CYTHON_FALLTHROUGH;
|
|
1674
|
+
case 10:
|
|
1675
|
+
if (kw_args > 0) {
|
|
1676
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kw_only);
|
|
1677
|
+
if (value) { values[10] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1678
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
if (unlikely(kw_args > 0)) {
|
|
1682
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
1683
|
+
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, 115, __pyx_L3_error)</span>
|
|
1684
|
+
}
|
|
1685
|
+
} else {
|
|
1686
|
+
switch (__pyx_nargs) {
|
|
1687
|
+
case 11: values[10] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 10);
|
|
1688
|
+
CYTHON_FALLTHROUGH;
|
|
1689
|
+
case 10: values[9] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 9);
|
|
1690
|
+
CYTHON_FALLTHROUGH;
|
|
1691
|
+
case 9: values[8] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 8);
|
|
1692
|
+
CYTHON_FALLTHROUGH;
|
|
1693
|
+
case 8: values[7] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 7);
|
|
1694
|
+
CYTHON_FALLTHROUGH;
|
|
1695
|
+
case 7: values[6] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 6);
|
|
1696
|
+
CYTHON_FALLTHROUGH;
|
|
1697
|
+
case 6: values[5] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 5);
|
|
1698
|
+
CYTHON_FALLTHROUGH;
|
|
1699
|
+
case 5: values[4] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 4);
|
|
1700
|
+
CYTHON_FALLTHROUGH;
|
|
1701
|
+
case 4: values[3] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 3);
|
|
1702
|
+
CYTHON_FALLTHROUGH;
|
|
1703
|
+
case 3: values[2] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 2);
|
|
1704
|
+
CYTHON_FALLTHROUGH;
|
|
1705
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
1706
|
+
CYTHON_FALLTHROUGH;
|
|
1707
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1708
|
+
break;
|
|
1709
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
__pyx_v_self = values[0];
|
|
1713
|
+
__pyx_v_default = values[1];
|
|
1714
|
+
__pyx_v_nullable = values[2];
|
|
1715
|
+
__pyx_v_required = values[3];
|
|
1716
|
+
__pyx_v_factory = values[4];
|
|
1717
|
+
__pyx_v_min = values[5];
|
|
1718
|
+
__pyx_v_max = values[6];
|
|
1719
|
+
__pyx_v_validator = values[7];
|
|
1720
|
+
__pyx_v_pattern = ((PyObject*)values[8]);
|
|
1721
|
+
__pyx_v_alias = ((PyObject*)values[9]);
|
|
1722
|
+
__pyx_v_kw_only = values[10];
|
|
1723
|
+
}
|
|
1724
|
+
goto __pyx_L6_skip;
|
|
1725
|
+
__pyx_L5_argtuple_error:;
|
|
1726
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 0, 1, 11, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 115, __pyx_L3_error)</span>
|
|
1727
|
+
__pyx_L6_skip:;
|
|
1728
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1729
|
+
__pyx_L3_error:;
|
|
1730
|
+
{
|
|
1731
|
+
Py_ssize_t __pyx_temp;
|
|
1732
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1733
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
1737
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1738
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1739
|
+
return NULL;
|
|
1740
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1741
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_pattern), (&PyUnicode_Type), 1, "pattern", 1))) <span class='error_goto'>__PYX_ERR(0, 124, __pyx_L1_error)</span>
|
|
1742
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_alias), (&PyUnicode_Type), 1, "alias", 1))) <span class='error_goto'>__PYX_ERR(0, 125, __pyx_L1_error)</span>
|
|
1743
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_nullable, __pyx_v_required, __pyx_v_factory, __pyx_v_min, __pyx_v_max, __pyx_v_validator, __pyx_v_pattern, __pyx_v_alias, __pyx_v_kw_only, __pyx_v_kwargs);
|
|
1744
|
+
</pre><pre class="cython line score-0"> <span class="">127</span>: **kwargs,</pre>
|
|
1745
|
+
<pre class="cython line score-0"> <span class="">128</span>: ):</pre>
|
|
1746
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">129</span>: self.name = None</pre>
|
|
1747
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_name, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 129, __pyx_L1_error)</span>
|
|
1748
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">130</span>: self.type = None</pre>
|
|
1749
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_type, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 130, __pyx_L1_error)</span>
|
|
1750
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">131</span>: self._typeinfo_ = {}</pre>
|
|
1751
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)</span>
|
|
1752
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1753
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_typeinfo, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 131, __pyx_L1_error)</span>
|
|
1754
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1755
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">132</span>: self._type_category = 'complex'</pre>
|
|
1756
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_type_category, __pyx_n_u_complex) < 0) <span class='error_goto'>__PYX_ERR(0, 132, __pyx_L1_error)</span>
|
|
1757
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">133</span>: self.parser: Optional[callable] = None</pre>
|
|
1758
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_parser, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 133, __pyx_L1_error)</span>
|
|
1759
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">134</span>: self.is_dc: bool = False</pre>
|
|
1760
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_is_dc, Py_False) < 0) <span class='error_goto'>__PYX_ERR(0, 134, __pyx_L1_error)</span>
|
|
1761
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">135</span>: self.is_primitive: bool = False</pre>
|
|
1762
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_is_primitive, Py_False) < 0) <span class='error_goto'>__PYX_ERR(0, 135, __pyx_L1_error)</span>
|
|
1763
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">136</span>: self._encoder_fn: Optional[callable] = None</pre>
|
|
1764
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_encoder_fn, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 136, __pyx_L1_error)</span>
|
|
1765
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">137</span>: self.validator: Optional[callable] = None</pre>
|
|
1766
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_validator, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 137, __pyx_L1_error)</span>
|
|
1767
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">138</span>: self._typing_args = None</pre>
|
|
1768
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_typing_args, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 138, __pyx_L1_error)</span>
|
|
1769
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">139</span>: self._inner_type = None</pre>
|
|
1770
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_inner_type, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 139, __pyx_L1_error)</span>
|
|
1771
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">140</span>: self._inner_is_dc = None</pre>
|
|
1772
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_inner_is_dc, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 140, __pyx_L1_error)</span>
|
|
1773
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">141</span>: self._inner_origin = None</pre>
|
|
1774
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_inner_origin, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 141, __pyx_L1_error)</span>
|
|
1775
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">142</span>: self.is_typing: bool = False</pre>
|
|
1776
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_is_typing, Py_False) < 0) <span class='error_goto'>__PYX_ERR(0, 142, __pyx_L1_error)</span>
|
|
1777
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">143</span>: self.type_args: Any = None</pre>
|
|
1778
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_type_args, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 143, __pyx_L1_error)</span>
|
|
1779
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">144</span>: self.origin: Any = None</pre>
|
|
1780
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_origin, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 144, __pyx_L1_error)</span>
|
|
1781
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">145</span>: self.args: Any = None</pre>
|
|
1782
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_args, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 145, __pyx_L1_error)</span>
|
|
1783
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">146</span>: self.compare = kwargs.pop("compare", True)</pre>
|
|
1784
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_compare, Py_True);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)</span>
|
|
1785
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1786
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_compare, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 146, __pyx_L1_error)</span>
|
|
1787
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1788
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">147</span>: self.init = kwargs.pop("init", True)</pre>
|
|
1789
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_init, Py_True);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)</span>
|
|
1790
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1791
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_init, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 147, __pyx_L1_error)</span>
|
|
1792
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1793
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">148</span>: self.repr = kwargs.pop("repr", True)</pre>
|
|
1794
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_repr, Py_True);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)</span>
|
|
1795
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1796
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_repr, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 148, __pyx_L1_error)</span>
|
|
1797
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1798
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">149</span>: self.hash = kwargs.pop("hash", True)</pre>
|
|
1799
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_hash, Py_True);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)</span>
|
|
1800
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1801
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_hash, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 149, __pyx_L1_error)</span>
|
|
1802
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1803
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">150</span>: self.default = default</pre>
|
|
1804
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_default, __pyx_v_default) < 0) <span class='error_goto'>__PYX_ERR(0, 150, __pyx_L1_error)</span>
|
|
1805
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">151</span>: self._nullable = nullable</pre>
|
|
1806
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_nullable_2, __pyx_v_nullable) < 0) <span class='error_goto'>__PYX_ERR(0, 151, __pyx_L1_error)</span>
|
|
1807
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">152</span>: self.kw_only = kw_only</pre>
|
|
1808
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_kw_only, __pyx_v_kw_only) < 0) <span class='error_goto'>__PYX_ERR(0, 152, __pyx_L1_error)</span>
|
|
1809
|
+
</pre><pre class="cython line score-0"> <span class="">153</span>: # set field type and dbtype</pre>
|
|
1810
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">154</span>: self._field_type = None</pre>
|
|
1811
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_field_type, Py_None) < 0) <span class='error_goto'>__PYX_ERR(0, 154, __pyx_L1_error)</span>
|
|
1812
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">155</span>: self._dbtype = kwargs.pop("db_type", None)</pre>
|
|
1813
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_db_type, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)</span>
|
|
1814
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1815
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_dbtype, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 155, __pyx_L1_error)</span>
|
|
1816
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1817
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">156</span>: self._required = required</pre>
|
|
1818
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_required_2, __pyx_v_required) < 0) <span class='error_goto'>__PYX_ERR(0, 156, __pyx_L1_error)</span>
|
|
1819
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">157</span>: self.description = kwargs.pop('description', None)</pre>
|
|
1820
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_description, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)</span>
|
|
1821
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1822
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_description, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 157, __pyx_L1_error)</span>
|
|
1823
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1824
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">158</span>: self._primary = kwargs.pop('primary_key', False)</pre>
|
|
1825
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_primary_key, Py_False);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)</span>
|
|
1826
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1827
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_primary, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 158, __pyx_L1_error)</span>
|
|
1828
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1829
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">159</span>: self._alias = alias</pre>
|
|
1830
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_alias_2, __pyx_v_alias) < 0) <span class='error_goto'>__PYX_ERR(0, 159, __pyx_L1_error)</span>
|
|
1831
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">160</span>: self._pattern = pattern</pre>
|
|
1832
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_pattern_2, __pyx_v_pattern) < 0) <span class='error_goto'>__PYX_ERR(0, 160, __pyx_L1_error)</span>
|
|
1833
|
+
</pre><pre class="cython line score-0"> <span class="">161</span>: meta = {</pre>
|
|
1834
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">162</span>: "required": required,</pre>
|
|
1835
|
+
<pre class='cython code score-7 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)</span>
|
|
1836
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1837
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_required, __pyx_v_required) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span>
|
|
1838
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">163</span>: "nullable": nullable,</pre>
|
|
1839
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_nullable, __pyx_v_nullable) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span>
|
|
1840
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">164</span>: "primary": self._primary,</pre>
|
|
1841
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_primary);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)</span>
|
|
1842
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1843
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_primary_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span>
|
|
1844
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1845
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">165</span>: "validator": validator,</pre>
|
|
1846
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_validator, __pyx_v_validator) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span>
|
|
1847
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">166</span>: "alias": self._alias</pre>
|
|
1848
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_alias_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)</span>
|
|
1849
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1850
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_alias, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span>
|
|
1851
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1852
|
+
__pyx_v_meta = ((PyObject*)__pyx_t_1);
|
|
1853
|
+
__pyx_t_1 = 0;
|
|
1854
|
+
</pre><pre class="cython line score-0"> <span class="">167</span>: }</pre>
|
|
1855
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">168</span>: _range = {}</pre>
|
|
1856
|
+
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)</span>
|
|
1857
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1858
|
+
__pyx_v__range = ((PyObject*)__pyx_t_1);
|
|
1859
|
+
__pyx_t_1 = 0;
|
|
1860
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">169</span>: if min is not None:</pre>
|
|
1861
|
+
<pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_min != Py_None);
|
|
1862
|
+
if (__pyx_t_3) {
|
|
1863
|
+
/* … */
|
|
1864
|
+
}
|
|
1865
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">170</span>: _range["min"] = min</pre>
|
|
1866
|
+
<pre class='cython code score-5 '> if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v__range, __pyx_n_u_min, __pyx_v_min) < 0))) <span class='error_goto'>__PYX_ERR(0, 170, __pyx_L1_error)</span>
|
|
1867
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">171</span>: if max is not None:</pre>
|
|
1868
|
+
<pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_max != Py_None);
|
|
1869
|
+
if (__pyx_t_3) {
|
|
1870
|
+
/* … */
|
|
1871
|
+
}
|
|
1872
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">172</span>: _range["max"] = max</pre>
|
|
1873
|
+
<pre class='cython code score-5 '> if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v__range, __pyx_n_u_max, __pyx_v_max) < 0))) <span class='error_goto'>__PYX_ERR(0, 172, __pyx_L1_error)</span>
|
|
1874
|
+
</pre><pre class="cython line score-0"> <span class="">173</span>: # representation:</pre>
|
|
1875
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">174</span>: if required is True:</pre>
|
|
1876
|
+
<pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_required == Py_True);
|
|
1877
|
+
if (__pyx_t_3) {
|
|
1878
|
+
/* … */
|
|
1879
|
+
}
|
|
1880
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">175</span>: self.init = True</pre>
|
|
1881
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_init, Py_True) < 0) <span class='error_goto'>__PYX_ERR(0, 175, __pyx_L1_error)</span>
|
|
1882
|
+
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">176</span>: if self.init is False:</pre>
|
|
1883
|
+
<pre class='cython code score-3 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)</span>
|
|
1884
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1885
|
+
__pyx_t_3 = (__pyx_t_1 == Py_False);
|
|
1886
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1887
|
+
if (__pyx_t_3) {
|
|
1888
|
+
/* … */
|
|
1889
|
+
}
|
|
1890
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">177</span>: self.repr = False</pre>
|
|
1891
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_repr, Py_False) < 0) <span class='error_goto'>__PYX_ERR(0, 177, __pyx_L1_error)</span>
|
|
1892
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">178</span>: metadata = kwargs.pop("metadata", {})</pre>
|
|
1893
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)</span>
|
|
1894
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1895
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_metadata, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)</span>
|
|
1896
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1897
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1898
|
+
__pyx_v_metadata = __pyx_t_2;
|
|
1899
|
+
__pyx_t_2 = 0;
|
|
1900
|
+
</pre><pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">179</span>: meta = {**meta, **metadata}</pre>
|
|
1901
|
+
<pre class='cython code score-23 '> __pyx_t_2 = <span class='py_c_api'>PyDict_Copy</span>(__pyx_v_meta);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)</span>
|
|
1902
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1903
|
+
if (unlikely(__pyx_v_metadata == Py_None)) {
|
|
1904
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
1905
|
+
<span class='error_goto'>__PYX_ERR(0, 179, __pyx_L1_error)</span>
|
|
1906
|
+
}
|
|
1907
|
+
if (unlikely(<span class='py_c_api'>PyDict_Update</span>(__pyx_t_2, __pyx_v_metadata) < 0)) {
|
|
1908
|
+
if (<span class='py_c_api'>PyErr_ExceptionMatches</span>(PyExc_AttributeError)) <span class='pyx_c_api'>__Pyx_RaiseMappingExpectedError</span>(__pyx_v_metadata);
|
|
1909
|
+
<span class='error_goto'>__PYX_ERR(0, 179, __pyx_L1_error)</span>
|
|
1910
|
+
}
|
|
1911
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_meta, ((PyObject*)__pyx_t_2));
|
|
1912
|
+
__pyx_t_2 = 0;
|
|
1913
|
+
</pre><pre class="cython line score-0"> <span class="">180</span>: ## Encoder, decoder and widget:</pre>
|
|
1914
|
+
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">181</span>: meta["widget"] = kwargs.pop('widget', {})</pre>
|
|
1915
|
+
<pre class='cython code score-11 '> __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, 181, __pyx_L1_error)</span>
|
|
1916
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1917
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_widget, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)</span>
|
|
1918
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1919
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1920
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_meta, __pyx_n_u_widget, __pyx_t_1) < 0))) <span class='error_goto'>__PYX_ERR(0, 181, __pyx_L1_error)</span>
|
|
1921
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1922
|
+
</pre><pre class="cython line score-0"> <span class="">182</span>: # Encoder and Decoder:</pre>
|
|
1923
|
+
<pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">183</span>: meta["encoder"] = kwargs.pop('encoder', None)</pre>
|
|
1924
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_encoder, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)</span>
|
|
1925
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1926
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_meta, __pyx_n_u_encoder, __pyx_t_1) < 0))) <span class='error_goto'>__PYX_ERR(0, 183, __pyx_L1_error)</span>
|
|
1927
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1928
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">184</span>: meta["decoder"] = kwargs.pop('decoder', None)</pre>
|
|
1929
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_decoder, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)</span>
|
|
1930
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1931
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_meta, __pyx_n_u_decoder, __pyx_t_1) < 0))) <span class='error_goto'>__PYX_ERR(0, 184, __pyx_L1_error)</span>
|
|
1932
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1933
|
+
</pre><pre class="cython line score-0"> <span class="">185</span>: # Future TODO: add more json-schema attributes</pre>
|
|
1934
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">186</span>: self.schema_extra = kwargs.pop('schema_extra', None)</pre>
|
|
1935
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_schema_extra, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)</span>
|
|
1936
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1937
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_schema_extra, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 186, __pyx_L1_error)</span>
|
|
1938
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1939
|
+
</pre><pre class="cython line score-0"> <span class="">187</span>: ## field is read-only</pre>
|
|
1940
|
+
<pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">188</span>: meta["readonly"] = bool(kwargs.pop('readonly', False))</pre>
|
|
1941
|
+
<pre class='cython code score-13 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_kwargs, __pyx_n_u_readonly, Py_False);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)</span>
|
|
1942
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1943
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) <span class='error_goto'>__PYX_ERR(0, 188, __pyx_L1_error)</span>
|
|
1944
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1945
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>((!(!__pyx_t_3)));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)</span>
|
|
1946
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1947
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_meta, __pyx_n_u_readonly, __pyx_t_1) < 0))) <span class='error_goto'>__PYX_ERR(0, 188, __pyx_L1_error)</span>
|
|
1948
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1949
|
+
</pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">189</span>: self._meta = {**meta, **_range, **kwargs}</pre>
|
|
1950
|
+
<pre class='cython code score-32 '> __pyx_t_1 = <span class='py_c_api'>PyDict_Copy</span>(__pyx_v_meta);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)</span>
|
|
1951
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1952
|
+
if (unlikely(<span class='py_c_api'>PyDict_Update</span>(__pyx_t_1, __pyx_v__range) < 0)) {
|
|
1953
|
+
if (<span class='py_c_api'>PyErr_ExceptionMatches</span>(PyExc_AttributeError)) <span class='pyx_c_api'>__Pyx_RaiseMappingExpectedError</span>(__pyx_v__range);
|
|
1954
|
+
<span class='error_goto'>__PYX_ERR(0, 189, __pyx_L1_error)</span>
|
|
1955
|
+
}
|
|
1956
|
+
if (unlikely(<span class='py_c_api'>PyDict_Update</span>(__pyx_t_1, __pyx_v_kwargs) < 0)) {
|
|
1957
|
+
if (<span class='py_c_api'>PyErr_ExceptionMatches</span>(PyExc_AttributeError)) <span class='pyx_c_api'>__Pyx_RaiseMappingExpectedError</span>(__pyx_v_kwargs);
|
|
1958
|
+
<span class='error_goto'>__PYX_ERR(0, 189, __pyx_L1_error)</span>
|
|
1959
|
+
}
|
|
1960
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_meta, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 189, __pyx_L1_error)</span>
|
|
1961
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1962
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">190</span>: self.default_factory = MISSING</pre>
|
|
1963
|
+
<pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_MISSING);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)</span>
|
|
1964
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1965
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_default_factory, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 190, __pyx_L1_error)</span>
|
|
1966
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1967
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">191</span>: if default is None:</pre>
|
|
1968
|
+
<pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_default == Py_None);
|
|
1969
|
+
if (__pyx_t_3) {
|
|
1970
|
+
/* … */
|
|
1971
|
+
}
|
|
1972
|
+
</pre><pre class="cython line score-0"> <span class="">192</span>: ## Default Factory:</pre>
|
|
1973
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">193</span>: default_factory = kwargs.get('default_factory', None)</pre>
|
|
1974
|
+
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_GetItemDefault</span>(__pyx_v_kwargs, __pyx_n_u_default_factory, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)</span>
|
|
1975
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1976
|
+
__pyx_v_default_factory = __pyx_t_1;
|
|
1977
|
+
__pyx_t_1 = 0;
|
|
1978
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">194</span>: if factory is not None and default_factory is not None:</pre>
|
|
1979
|
+
<pre class='cython code score-0 '> __pyx_t_4 = (__pyx_v_factory != Py_None);
|
|
1980
|
+
if (__pyx_t_4) {
|
|
1981
|
+
} else {
|
|
1982
|
+
__pyx_t_3 = __pyx_t_4;
|
|
1983
|
+
goto __pyx_L9_bool_binop_done;
|
|
1984
|
+
}
|
|
1985
|
+
__pyx_t_4 = (__pyx_v_default_factory != Py_None);
|
|
1986
|
+
__pyx_t_3 = __pyx_t_4;
|
|
1987
|
+
__pyx_L9_bool_binop_done:;
|
|
1988
|
+
if (unlikely(__pyx_t_3)) {
|
|
1989
|
+
/* … */
|
|
1990
|
+
}
|
|
1991
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">195</span>: raise ValueError(</pre>
|
|
1992
|
+
<pre class='cython code score-10 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_ValueError, __pyx_tuple__5, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)</span>
|
|
1993
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1994
|
+
<span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0);
|
|
1995
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1996
|
+
<span class='error_goto'>__PYX_ERR(0, 195, __pyx_L1_error)</span>
|
|
1997
|
+
/* … */
|
|
1998
|
+
__pyx_tuple__5 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_u_Cannot_specify_both_factory_and);<span class='error_goto'> if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 195, __pyx_L1_error)</span>
|
|
1999
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__5);
|
|
2000
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__5);
|
|
2001
|
+
</pre><pre class="cython line score-0"> <span class="">196</span>: "Cannot specify both factory and default_factory"</pre>
|
|
2002
|
+
<pre class="cython line score-0"> <span class="">197</span>: )</pre>
|
|
2003
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">198</span>: if factory is not None:</pre>
|
|
2004
|
+
<pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_factory != Py_None);
|
|
2005
|
+
if (__pyx_t_3) {
|
|
2006
|
+
/* … */
|
|
2007
|
+
goto __pyx_L11;
|
|
2008
|
+
}
|
|
2009
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">199</span>: self.default_factory = factory</pre>
|
|
2010
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_default_factory, __pyx_v_factory) < 0) <span class='error_goto'>__PYX_ERR(0, 199, __pyx_L1_error)</span>
|
|
2011
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">200</span>: self.default = MISSING</pre>
|
|
2012
|
+
<pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_MISSING);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)</span>
|
|
2013
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2014
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_default, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 200, __pyx_L1_error)</span>
|
|
2015
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2016
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">201</span>: elif default_factory is not None:</pre>
|
|
2017
|
+
<pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_default_factory != Py_None);
|
|
2018
|
+
if (__pyx_t_3) {
|
|
2019
|
+
/* … */
|
|
2020
|
+
}
|
|
2021
|
+
__pyx_L11:;
|
|
2022
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">202</span>: self.default_factory = default_factory</pre>
|
|
2023
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_default_factory, __pyx_v_default_factory) < 0) <span class='error_goto'>__PYX_ERR(0, 202, __pyx_L1_error)</span>
|
|
2024
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">203</span>: if self.default_factory is not MISSING:</pre>
|
|
2025
|
+
<pre class='cython code score-6 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_default_factory);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)</span>
|
|
2026
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2027
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_MISSING);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)</span>
|
|
2028
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2029
|
+
__pyx_t_3 = (__pyx_t_1 != __pyx_t_2);
|
|
2030
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2031
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2032
|
+
if (__pyx_t_3) {
|
|
2033
|
+
/* … */
|
|
2034
|
+
}
|
|
2035
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">204</span>: self.default = MISSING</pre>
|
|
2036
|
+
<pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_MISSING);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)</span>
|
|
2037
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2038
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_default, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 204, __pyx_L1_error)</span>
|
|
2039
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2040
|
+
</pre><pre class="cython line score-0"> <span class="">205</span>: args = {</pre>
|
|
2041
|
+
<pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">206</span>: "init": self.init,</pre>
|
|
2042
|
+
<pre class='cython code score-10 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(6);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2043
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2044
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2045
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2046
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_u_init, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2047
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2048
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">207</span>: "repr": self.repr,</pre>
|
|
2049
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_repr);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)</span>
|
|
2050
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2051
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_u_repr, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2052
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2053
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">208</span>: "hash": self.hash,</pre>
|
|
2054
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_hash);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)</span>
|
|
2055
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2056
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_u_hash, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2057
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2058
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">209</span>: "compare": self.compare,</pre>
|
|
2059
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_compare);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)</span>
|
|
2060
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2061
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_u_compare, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2062
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2063
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">210</span>: "metadata": self._meta,</pre>
|
|
2064
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_meta);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)</span>
|
|
2065
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2066
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_u_metadata, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2067
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2068
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">211</span>: "kw_only": self.kw_only</pre>
|
|
2069
|
+
<pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_kw_only);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)</span>
|
|
2070
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2071
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_u_kw_only, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 206, __pyx_L1_error)</span>
|
|
2072
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2073
|
+
__pyx_v_args = ((PyObject*)__pyx_t_2);
|
|
2074
|
+
__pyx_t_2 = 0;
|
|
2075
|
+
</pre><pre class="cython line score-0"> <span class="">212</span>: }</pre>
|
|
2076
|
+
<pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">213</span>: ff.__init__(</pre>
|
|
2077
|
+
<pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_ff);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)</span>
|
|
2078
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2079
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_init_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)</span>
|
|
2080
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2081
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2082
|
+
/* … */
|
|
2083
|
+
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)</span>
|
|
2084
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2085
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self);
|
|
2086
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_self);
|
|
2087
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_v_self)) <span class='error_goto'>__PYX_ERR(0, 213, __pyx_L1_error)</span>;
|
|
2088
|
+
/* … */
|
|
2089
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error)</span>
|
|
2090
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2091
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2092
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2093
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
2094
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2095
|
+
</pre><pre class="cython line score-0"> <span class="">214</span>: self,</pre>
|
|
2096
|
+
<pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">215</span>: default=self.default,</pre>
|
|
2097
|
+
<pre class='cython code score-10 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 215, __pyx_L1_error)</span>
|
|
2098
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2099
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_default);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L1_error)</span>
|
|
2100
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
2101
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_6, __pyx_n_s_default, __pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 215, __pyx_L1_error)</span>
|
|
2102
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
2103
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">216</span>: default_factory=self.default_factory,</pre>
|
|
2104
|
+
<pre class='cython code score-8 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_default_factory);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L1_error)</span>
|
|
2105
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
2106
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_6, __pyx_n_s_default_factory, __pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 215, __pyx_L1_error)</span>
|
|
2107
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
2108
|
+
__pyx_t_5 = __pyx_t_6;
|
|
2109
|
+
__pyx_t_6 = 0;
|
|
2110
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">217</span>: **args</pre>
|
|
2111
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_MergeKeywords</span>(__pyx_t_5, __pyx_v_args) < 0) <span class='error_goto'>__PYX_ERR(0, 217, __pyx_L1_error)</span>
|
|
2112
|
+
</pre><pre class="cython line score-0"> <span class="">218</span>: )</pre>
|
|
2113
|
+
<pre class="cython line score-0"> <span class="">219</span>: # set field type and dbtype</pre>
|
|
2114
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">220</span>: self._field_type = self.type</pre>
|
|
2115
|
+
<pre class='cython code score-5 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_type);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error)</span>
|
|
2116
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2117
|
+
if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(__pyx_v_self, __pyx_n_s_field_type, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 220, __pyx_L1_error)</span>
|
|
2118
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2119
|
+
</pre><pre class="cython line score-0"> <span class="">221</span>: </pre>
|
|
2120
|
+
<pre class="cython line score-68" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">222</span>: @_recursive_repr</pre>
|
|
2121
|
+
<pre class='cython code score-68 '>/* Python wrapper */
|
|
2122
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_3__repr__(PyObject *__pyx_self,
|
|
2123
|
+
#if CYTHON_METH_FASTCALL
|
|
2124
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2125
|
+
#else
|
|
2126
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2127
|
+
#endif
|
|
2128
|
+
); /*proto*/
|
|
2129
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_2__repr__, "Field.__repr__(self)");
|
|
2130
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_2__repr__};
|
|
2131
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_3__repr__(PyObject *__pyx_self,
|
|
2132
|
+
#if CYTHON_METH_FASTCALL
|
|
2133
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2134
|
+
#else
|
|
2135
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2136
|
+
#endif
|
|
2137
|
+
) {
|
|
2138
|
+
PyObject *__pyx_v_self = 0;
|
|
2139
|
+
#if !CYTHON_METH_FASTCALL
|
|
2140
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2141
|
+
#endif
|
|
2142
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2143
|
+
PyObject *__pyx_r = 0;
|
|
2144
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2145
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0);
|
|
2146
|
+
#if !CYTHON_METH_FASTCALL
|
|
2147
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2148
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2149
|
+
#else
|
|
2150
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2151
|
+
#endif
|
|
2152
|
+
#endif
|
|
2153
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2154
|
+
{
|
|
2155
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
2156
|
+
PyObject* values[1] = {0};
|
|
2157
|
+
if (__pyx_kwds) {
|
|
2158
|
+
Py_ssize_t kw_args;
|
|
2159
|
+
switch (__pyx_nargs) {
|
|
2160
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2161
|
+
CYTHON_FALLTHROUGH;
|
|
2162
|
+
case 0: break;
|
|
2163
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2164
|
+
}
|
|
2165
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2166
|
+
switch (__pyx_nargs) {
|
|
2167
|
+
case 0:
|
|
2168
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
2169
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2170
|
+
kw_args--;
|
|
2171
|
+
}
|
|
2172
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 222, __pyx_L3_error)</span>
|
|
2173
|
+
else goto __pyx_L5_argtuple_error;
|
|
2174
|
+
}
|
|
2175
|
+
if (unlikely(kw_args > 0)) {
|
|
2176
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2177
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) <span class='error_goto'>__PYX_ERR(0, 222, __pyx_L3_error)</span>
|
|
2178
|
+
}
|
|
2179
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
2180
|
+
goto __pyx_L5_argtuple_error;
|
|
2181
|
+
} else {
|
|
2182
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2183
|
+
}
|
|
2184
|
+
__pyx_v_self = values[0];
|
|
2185
|
+
}
|
|
2186
|
+
goto __pyx_L6_skip;
|
|
2187
|
+
__pyx_L5_argtuple_error:;
|
|
2188
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__repr__", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 222, __pyx_L3_error)</span>
|
|
2189
|
+
__pyx_L6_skip:;
|
|
2190
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
2191
|
+
__pyx_L3_error:;
|
|
2192
|
+
{
|
|
2193
|
+
Py_ssize_t __pyx_temp;
|
|
2194
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2195
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2199
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2200
|
+
return NULL;
|
|
2201
|
+
__pyx_L4_argument_unpacking_done:;
|
|
2202
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_2__repr__(__pyx_self, __pyx_v_self);
|
|
2203
|
+
int __pyx_lineno = 0;
|
|
2204
|
+
const char *__pyx_filename = NULL;
|
|
2205
|
+
int __pyx_clineno = 0;
|
|
2206
|
+
|
|
2207
|
+
/* function exit code */
|
|
2208
|
+
{
|
|
2209
|
+
Py_ssize_t __pyx_temp;
|
|
2210
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2211
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2215
|
+
return __pyx_r;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
2219
|
+
PyObject *__pyx_r = NULL;
|
|
2220
|
+
/* … */
|
|
2221
|
+
/* function exit code */
|
|
2222
|
+
__pyx_L1_error:;
|
|
2223
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2224
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
2225
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
2226
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2227
|
+
__pyx_r = NULL;
|
|
2228
|
+
__pyx_L0:;
|
|
2229
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2230
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2231
|
+
return __pyx_r;
|
|
2232
|
+
}
|
|
2233
|
+
/* … */
|
|
2234
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_recursive_repr);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)</span>
|
|
2235
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2236
|
+
/* … */
|
|
2237
|
+
__pyx_tuple__18 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 222, __pyx_L1_error)</span>
|
|
2238
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__18);
|
|
2239
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__18);
|
|
2240
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_3__repr__, 0, __pyx_n_s_Field___repr, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__19));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)</span>
|
|
2241
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
2242
|
+
__pyx_t_8 = NULL;
|
|
2243
|
+
__pyx_t_9 = 0;
|
|
2244
|
+
#if CYTHON_UNPACK_METHODS
|
|
2245
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
|
2246
|
+
__pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
|
2247
|
+
if (likely(__pyx_t_8)) {
|
|
2248
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
|
2249
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8);
|
|
2250
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
2251
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
|
2252
|
+
__pyx_t_9 = 1;
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
#endif
|
|
2256
|
+
{
|
|
2257
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
|
|
2258
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
|
|
2259
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
|
2260
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
2261
|
+
if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 222, __pyx_L1_error)</span>
|
|
2262
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2263
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2264
|
+
}
|
|
2265
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_repr_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 222, __pyx_L1_error)</span>
|
|
2266
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2267
|
+
__pyx_codeobj__19 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_repr_2, 222, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 222, __pyx_L1_error)</span>
|
|
2268
|
+
</pre><pre class="cython line score-0"> <span class="">223</span>: def __repr__(self):</pre>
|
|
2269
|
+
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">224</span>: if self._alias is None:</pre>
|
|
2270
|
+
<pre class='cython code score-3 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_alias_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)</span>
|
|
2271
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2272
|
+
__pyx_t_2 = (__pyx_t_1 == Py_None);
|
|
2273
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2274
|
+
if (__pyx_t_2) {
|
|
2275
|
+
/* … */
|
|
2276
|
+
}
|
|
2277
|
+
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">225</span>: return (</pre>
|
|
2278
|
+
<pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2279
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">226</span>: "Field("</pre>
|
|
2280
|
+
<pre class='cython code score-10 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(7);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)</span>
|
|
2281
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2282
|
+
__pyx_t_3 = 0;
|
|
2283
|
+
__pyx_t_4 = 127;
|
|
2284
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_Field_column);
|
|
2285
|
+
__pyx_t_3 += 13;
|
|
2286
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_Field_column);
|
|
2287
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_kp_u_Field_column);
|
|
2288
|
+
/* … */
|
|
2289
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_1, 7, __pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)</span>
|
|
2290
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2291
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2292
|
+
__pyx_r = __pyx_t_6;
|
|
2293
|
+
__pyx_t_6 = 0;
|
|
2294
|
+
goto __pyx_L0;
|
|
2295
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">227</span>: f"column={self.name!r}, "</pre>
|
|
2296
|
+
<pre class='cython code score-19 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)</span>
|
|
2297
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2298
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_5), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error)</span>
|
|
2299
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2300
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
2301
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_6) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_6) : __pyx_t_4;
|
|
2302
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_6);
|
|
2303
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
|
|
2304
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 1, __pyx_t_6);
|
|
2305
|
+
__pyx_t_6 = 0;
|
|
2306
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_type_2);
|
|
2307
|
+
__pyx_t_3 += 7;
|
|
2308
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_type_2);
|
|
2309
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 2, __pyx_kp_u_type_2);
|
|
2310
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">228</span>: f"type={self.type!r}, "</pre>
|
|
2311
|
+
<pre class='cython code score-19 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_type);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)</span>
|
|
2312
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2313
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_6), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)</span>
|
|
2314
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2315
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2316
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_4;
|
|
2317
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
2318
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
2319
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 3, __pyx_t_5);
|
|
2320
|
+
__pyx_t_5 = 0;
|
|
2321
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_default_2);
|
|
2322
|
+
__pyx_t_3 += 10;
|
|
2323
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_default_2);
|
|
2324
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 4, __pyx_kp_u_default_2);
|
|
2325
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">229</span>: f"default={self.default!r})"</pre>
|
|
2326
|
+
<pre class='cython code score-19 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_default);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error)</span>
|
|
2327
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2328
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_5), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error)</span>
|
|
2329
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2330
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
2331
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_6) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_6) : __pyx_t_4;
|
|
2332
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_6);
|
|
2333
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
|
|
2334
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 5, __pyx_t_6);
|
|
2335
|
+
__pyx_t_6 = 0;
|
|
2336
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__6);
|
|
2337
|
+
__pyx_t_3 += 1;
|
|
2338
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__6);
|
|
2339
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 6, __pyx_kp_u__6);
|
|
2340
|
+
</pre><pre class="cython line score-0"> <span class="">230</span>: )</pre>
|
|
2341
|
+
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">231</span>: return (</pre>
|
|
2342
|
+
<pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2343
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">232</span>: "Field("</pre>
|
|
2344
|
+
<pre class='cython code score-10 '> __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(9);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)</span>
|
|
2345
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2346
|
+
__pyx_t_3 = 0;
|
|
2347
|
+
__pyx_t_4 = 127;
|
|
2348
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_Field_column);
|
|
2349
|
+
__pyx_t_3 += 13;
|
|
2350
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_Field_column);
|
|
2351
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_kp_u_Field_column);
|
|
2352
|
+
/* … */
|
|
2353
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_6, 9, __pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)</span>
|
|
2354
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2355
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2356
|
+
__pyx_r = __pyx_t_1;
|
|
2357
|
+
__pyx_t_1 = 0;
|
|
2358
|
+
goto __pyx_L0;
|
|
2359
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">233</span>: f"column={self.name!r}, "</pre>
|
|
2360
|
+
<pre class='cython code score-19 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)</span>
|
|
2361
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2362
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_1), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error)</span>
|
|
2363
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2364
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2365
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_4;
|
|
2366
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
2367
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
2368
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_t_5);
|
|
2369
|
+
__pyx_t_5 = 0;
|
|
2370
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_type_2);
|
|
2371
|
+
__pyx_t_3 += 7;
|
|
2372
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_type_2);
|
|
2373
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, __pyx_kp_u_type_2);
|
|
2374
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">234</span>: f"type={self.type!r}, "</pre>
|
|
2375
|
+
<pre class='cython code score-19 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_type);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error)</span>
|
|
2376
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2377
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_5), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)</span>
|
|
2378
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2379
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
2380
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) : __pyx_t_4;
|
|
2381
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_1);
|
|
2382
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
2383
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 3, __pyx_t_1);
|
|
2384
|
+
__pyx_t_1 = 0;
|
|
2385
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_alias_3);
|
|
2386
|
+
__pyx_t_3 += 8;
|
|
2387
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_alias_3);
|
|
2388
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 4, __pyx_kp_u_alias_3);
|
|
2389
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">235</span>: f"alias={self._alias!r}, "</pre>
|
|
2390
|
+
<pre class='cython code score-19 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_alias_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)</span>
|
|
2391
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2392
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_1), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)</span>
|
|
2393
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2394
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2395
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_4;
|
|
2396
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
2397
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
2398
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 5, __pyx_t_5);
|
|
2399
|
+
__pyx_t_5 = 0;
|
|
2400
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_default_2);
|
|
2401
|
+
__pyx_t_3 += 10;
|
|
2402
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_default_2);
|
|
2403
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 6, __pyx_kp_u_default_2);
|
|
2404
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">236</span>: f"default={self.default!r})"</pre>
|
|
2405
|
+
<pre class='cython code score-19 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_default);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 236, __pyx_L1_error)</span>
|
|
2406
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2407
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_t_5), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)</span>
|
|
2408
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2409
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
2410
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_1) : __pyx_t_4;
|
|
2411
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_1);
|
|
2412
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
2413
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 7, __pyx_t_1);
|
|
2414
|
+
__pyx_t_1 = 0;
|
|
2415
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__6);
|
|
2416
|
+
__pyx_t_3 += 1;
|
|
2417
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__6);
|
|
2418
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 8, __pyx_kp_u__6);
|
|
2419
|
+
</pre><pre class="cython line score-0"> <span class="">237</span>: )</pre>
|
|
2420
|
+
<pre class="cython line score-0"> <span class="">238</span>: </pre>
|
|
2421
|
+
<pre class="cython line score-54" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">239</span>: def get_metadata(self) -> dict:</pre>
|
|
2422
|
+
<pre class='cython code score-54 '>/* Python wrapper */
|
|
2423
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_5get_metadata(PyObject *__pyx_self,
|
|
2424
|
+
#if CYTHON_METH_FASTCALL
|
|
2425
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2426
|
+
#else
|
|
2427
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2428
|
+
#endif
|
|
2429
|
+
); /*proto*/
|
|
2430
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_4get_metadata, "Field.get_metadata(self) -> dict");
|
|
2431
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_5get_metadata = {"get_metadata", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_5get_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_4get_metadata};
|
|
2432
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_5get_metadata(PyObject *__pyx_self,
|
|
2433
|
+
#if CYTHON_METH_FASTCALL
|
|
2434
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2435
|
+
#else
|
|
2436
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2437
|
+
#endif
|
|
2438
|
+
) {
|
|
2439
|
+
PyObject *__pyx_v_self = 0;
|
|
2440
|
+
#if !CYTHON_METH_FASTCALL
|
|
2441
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2442
|
+
#endif
|
|
2443
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2444
|
+
PyObject *__pyx_r = 0;
|
|
2445
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2446
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_metadata (wrapper)", 0);
|
|
2447
|
+
#if !CYTHON_METH_FASTCALL
|
|
2448
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2449
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2450
|
+
#else
|
|
2451
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2452
|
+
#endif
|
|
2453
|
+
#endif
|
|
2454
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2455
|
+
{
|
|
2456
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
2457
|
+
PyObject* values[1] = {0};
|
|
2458
|
+
if (__pyx_kwds) {
|
|
2459
|
+
Py_ssize_t kw_args;
|
|
2460
|
+
switch (__pyx_nargs) {
|
|
2461
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2462
|
+
CYTHON_FALLTHROUGH;
|
|
2463
|
+
case 0: break;
|
|
2464
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2465
|
+
}
|
|
2466
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2467
|
+
switch (__pyx_nargs) {
|
|
2468
|
+
case 0:
|
|
2469
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
2470
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2471
|
+
kw_args--;
|
|
2472
|
+
}
|
|
2473
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 239, __pyx_L3_error)</span>
|
|
2474
|
+
else goto __pyx_L5_argtuple_error;
|
|
2475
|
+
}
|
|
2476
|
+
if (unlikely(kw_args > 0)) {
|
|
2477
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2478
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_metadata") < 0)) <span class='error_goto'>__PYX_ERR(0, 239, __pyx_L3_error)</span>
|
|
2479
|
+
}
|
|
2480
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
2481
|
+
goto __pyx_L5_argtuple_error;
|
|
2482
|
+
} else {
|
|
2483
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2484
|
+
}
|
|
2485
|
+
__pyx_v_self = values[0];
|
|
2486
|
+
}
|
|
2487
|
+
goto __pyx_L6_skip;
|
|
2488
|
+
__pyx_L5_argtuple_error:;
|
|
2489
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_metadata", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 239, __pyx_L3_error)</span>
|
|
2490
|
+
__pyx_L6_skip:;
|
|
2491
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
2492
|
+
__pyx_L3_error:;
|
|
2493
|
+
{
|
|
2494
|
+
Py_ssize_t __pyx_temp;
|
|
2495
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2496
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.get_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2500
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2501
|
+
return NULL;
|
|
2502
|
+
__pyx_L4_argument_unpacking_done:;
|
|
2503
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_4get_metadata(__pyx_self, __pyx_v_self);
|
|
2504
|
+
int __pyx_lineno = 0;
|
|
2505
|
+
const char *__pyx_filename = NULL;
|
|
2506
|
+
int __pyx_clineno = 0;
|
|
2507
|
+
|
|
2508
|
+
/* function exit code */
|
|
2509
|
+
{
|
|
2510
|
+
Py_ssize_t __pyx_temp;
|
|
2511
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2512
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2516
|
+
return __pyx_r;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_4get_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
2520
|
+
PyObject *__pyx_r = NULL;
|
|
2521
|
+
/* … */
|
|
2522
|
+
/* function exit code */
|
|
2523
|
+
__pyx_L1_error:;
|
|
2524
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2525
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.get_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2526
|
+
__pyx_r = NULL;
|
|
2527
|
+
__pyx_L0:;
|
|
2528
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2529
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2530
|
+
return __pyx_r;
|
|
2531
|
+
}
|
|
2532
|
+
/* … */
|
|
2533
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)</span>
|
|
2534
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2535
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_dict) < 0) <span class='error_goto'>__PYX_ERR(0, 239, __pyx_L1_error)</span>
|
|
2536
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_5get_metadata, 0, __pyx_n_s_Field_get_metadata, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__20));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)</span>
|
|
2537
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2538
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_2, __pyx_t_6);
|
|
2539
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2540
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_get_metadata, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 239, __pyx_L1_error)</span>
|
|
2541
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2542
|
+
/* … */
|
|
2543
|
+
__pyx_codeobj__20 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_get_metadata, 239, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 239, __pyx_L1_error)</span>
|
|
2544
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">240</span>: return self._meta</pre>
|
|
2545
|
+
<pre class='cython code score-10 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2546
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_meta);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)</span>
|
|
2547
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2548
|
+
if (!(likely(<span class='py_c_api'>PyDict_CheckExact</span>(__pyx_t_1))||((__pyx_t_1) == Py_None) || <span class='pyx_c_api'>__Pyx_RaiseUnexpectedTypeError</span>("dict", __pyx_t_1))) <span class='error_goto'>__PYX_ERR(0, 240, __pyx_L1_error)</span>
|
|
2549
|
+
__pyx_r = ((PyObject*)__pyx_t_1);
|
|
2550
|
+
__pyx_t_1 = 0;
|
|
2551
|
+
goto __pyx_L0;
|
|
2552
|
+
</pre><pre class="cython line score-0"> <span class="">241</span>: </pre>
|
|
2553
|
+
<pre class="cython line score-54" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">242</span>: def required(self) -> bool:</pre>
|
|
2554
|
+
<pre class='cython code score-54 '>/* Python wrapper */
|
|
2555
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_7required(PyObject *__pyx_self,
|
|
2556
|
+
#if CYTHON_METH_FASTCALL
|
|
2557
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2558
|
+
#else
|
|
2559
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2560
|
+
#endif
|
|
2561
|
+
); /*proto*/
|
|
2562
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_6required, "Field.required(self) -> bool");
|
|
2563
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_7required = {"required", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_7required, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_6required};
|
|
2564
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_7required(PyObject *__pyx_self,
|
|
2565
|
+
#if CYTHON_METH_FASTCALL
|
|
2566
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2567
|
+
#else
|
|
2568
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2569
|
+
#endif
|
|
2570
|
+
) {
|
|
2571
|
+
PyObject *__pyx_v_self = 0;
|
|
2572
|
+
#if !CYTHON_METH_FASTCALL
|
|
2573
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2574
|
+
#endif
|
|
2575
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2576
|
+
PyObject *__pyx_r = 0;
|
|
2577
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2578
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("required (wrapper)", 0);
|
|
2579
|
+
#if !CYTHON_METH_FASTCALL
|
|
2580
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2581
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2582
|
+
#else
|
|
2583
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2584
|
+
#endif
|
|
2585
|
+
#endif
|
|
2586
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2587
|
+
{
|
|
2588
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
2589
|
+
PyObject* values[1] = {0};
|
|
2590
|
+
if (__pyx_kwds) {
|
|
2591
|
+
Py_ssize_t kw_args;
|
|
2592
|
+
switch (__pyx_nargs) {
|
|
2593
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2594
|
+
CYTHON_FALLTHROUGH;
|
|
2595
|
+
case 0: break;
|
|
2596
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2597
|
+
}
|
|
2598
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2599
|
+
switch (__pyx_nargs) {
|
|
2600
|
+
case 0:
|
|
2601
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
2602
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2603
|
+
kw_args--;
|
|
2604
|
+
}
|
|
2605
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 242, __pyx_L3_error)</span>
|
|
2606
|
+
else goto __pyx_L5_argtuple_error;
|
|
2607
|
+
}
|
|
2608
|
+
if (unlikely(kw_args > 0)) {
|
|
2609
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2610
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "required") < 0)) <span class='error_goto'>__PYX_ERR(0, 242, __pyx_L3_error)</span>
|
|
2611
|
+
}
|
|
2612
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
2613
|
+
goto __pyx_L5_argtuple_error;
|
|
2614
|
+
} else {
|
|
2615
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2616
|
+
}
|
|
2617
|
+
__pyx_v_self = values[0];
|
|
2618
|
+
}
|
|
2619
|
+
goto __pyx_L6_skip;
|
|
2620
|
+
__pyx_L5_argtuple_error:;
|
|
2621
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("required", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 242, __pyx_L3_error)</span>
|
|
2622
|
+
__pyx_L6_skip:;
|
|
2623
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
2624
|
+
__pyx_L3_error:;
|
|
2625
|
+
{
|
|
2626
|
+
Py_ssize_t __pyx_temp;
|
|
2627
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2628
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.required", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2632
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2633
|
+
return NULL;
|
|
2634
|
+
__pyx_L4_argument_unpacking_done:;
|
|
2635
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_6required(__pyx_self, __pyx_v_self);
|
|
2636
|
+
int __pyx_lineno = 0;
|
|
2637
|
+
const char *__pyx_filename = NULL;
|
|
2638
|
+
int __pyx_clineno = 0;
|
|
2639
|
+
|
|
2640
|
+
/* function exit code */
|
|
2641
|
+
{
|
|
2642
|
+
Py_ssize_t __pyx_temp;
|
|
2643
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2644
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2648
|
+
return __pyx_r;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_6required(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
2652
|
+
PyObject *__pyx_r = NULL;
|
|
2653
|
+
/* … */
|
|
2654
|
+
/* function exit code */
|
|
2655
|
+
__pyx_L1_error:;
|
|
2656
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2657
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.required", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2658
|
+
__pyx_r = NULL;
|
|
2659
|
+
__pyx_L0:;
|
|
2660
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2661
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2662
|
+
return __pyx_r;
|
|
2663
|
+
}
|
|
2664
|
+
/* … */
|
|
2665
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)</span>
|
|
2666
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2667
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 242, __pyx_L1_error)</span>
|
|
2668
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_7required, 0, __pyx_n_s_Field_required, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__21));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)</span>
|
|
2669
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2670
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_6, __pyx_t_2);
|
|
2671
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2672
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_required, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 242, __pyx_L1_error)</span>
|
|
2673
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2674
|
+
/* … */
|
|
2675
|
+
__pyx_codeobj__21 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_required, 242, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 242, __pyx_L1_error)</span>
|
|
2676
|
+
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">243</span>: return self._required</pre>
|
|
2677
|
+
<pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2678
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_required_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)</span>
|
|
2679
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2680
|
+
__pyx_r = __pyx_t_1;
|
|
2681
|
+
__pyx_t_1 = 0;
|
|
2682
|
+
goto __pyx_L0;
|
|
2683
|
+
</pre><pre class="cython line score-0"> <span class="">244</span>: </pre>
|
|
2684
|
+
<pre class="cython line score-54" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">245</span>: def nullable(self) -> bool:</pre>
|
|
2685
|
+
<pre class='cython code score-54 '>/* Python wrapper */
|
|
2686
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_9nullable(PyObject *__pyx_self,
|
|
2687
|
+
#if CYTHON_METH_FASTCALL
|
|
2688
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2689
|
+
#else
|
|
2690
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2691
|
+
#endif
|
|
2692
|
+
); /*proto*/
|
|
2693
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_8nullable, "Field.nullable(self) -> bool");
|
|
2694
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_9nullable = {"nullable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_9nullable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_8nullable};
|
|
2695
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_9nullable(PyObject *__pyx_self,
|
|
2696
|
+
#if CYTHON_METH_FASTCALL
|
|
2697
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2698
|
+
#else
|
|
2699
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2700
|
+
#endif
|
|
2701
|
+
) {
|
|
2702
|
+
PyObject *__pyx_v_self = 0;
|
|
2703
|
+
#if !CYTHON_METH_FASTCALL
|
|
2704
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2705
|
+
#endif
|
|
2706
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2707
|
+
PyObject *__pyx_r = 0;
|
|
2708
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2709
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("nullable (wrapper)", 0);
|
|
2710
|
+
#if !CYTHON_METH_FASTCALL
|
|
2711
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2712
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2713
|
+
#else
|
|
2714
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2715
|
+
#endif
|
|
2716
|
+
#endif
|
|
2717
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2718
|
+
{
|
|
2719
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
2720
|
+
PyObject* values[1] = {0};
|
|
2721
|
+
if (__pyx_kwds) {
|
|
2722
|
+
Py_ssize_t kw_args;
|
|
2723
|
+
switch (__pyx_nargs) {
|
|
2724
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2725
|
+
CYTHON_FALLTHROUGH;
|
|
2726
|
+
case 0: break;
|
|
2727
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2728
|
+
}
|
|
2729
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2730
|
+
switch (__pyx_nargs) {
|
|
2731
|
+
case 0:
|
|
2732
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
2733
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2734
|
+
kw_args--;
|
|
2735
|
+
}
|
|
2736
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 245, __pyx_L3_error)</span>
|
|
2737
|
+
else goto __pyx_L5_argtuple_error;
|
|
2738
|
+
}
|
|
2739
|
+
if (unlikely(kw_args > 0)) {
|
|
2740
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2741
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "nullable") < 0)) <span class='error_goto'>__PYX_ERR(0, 245, __pyx_L3_error)</span>
|
|
2742
|
+
}
|
|
2743
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
2744
|
+
goto __pyx_L5_argtuple_error;
|
|
2745
|
+
} else {
|
|
2746
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2747
|
+
}
|
|
2748
|
+
__pyx_v_self = values[0];
|
|
2749
|
+
}
|
|
2750
|
+
goto __pyx_L6_skip;
|
|
2751
|
+
__pyx_L5_argtuple_error:;
|
|
2752
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("nullable", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 245, __pyx_L3_error)</span>
|
|
2753
|
+
__pyx_L6_skip:;
|
|
2754
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
2755
|
+
__pyx_L3_error:;
|
|
2756
|
+
{
|
|
2757
|
+
Py_ssize_t __pyx_temp;
|
|
2758
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2759
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.nullable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2763
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2764
|
+
return NULL;
|
|
2765
|
+
__pyx_L4_argument_unpacking_done:;
|
|
2766
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_8nullable(__pyx_self, __pyx_v_self);
|
|
2767
|
+
int __pyx_lineno = 0;
|
|
2768
|
+
const char *__pyx_filename = NULL;
|
|
2769
|
+
int __pyx_clineno = 0;
|
|
2770
|
+
|
|
2771
|
+
/* function exit code */
|
|
2772
|
+
{
|
|
2773
|
+
Py_ssize_t __pyx_temp;
|
|
2774
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2775
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2779
|
+
return __pyx_r;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_8nullable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
2783
|
+
PyObject *__pyx_r = NULL;
|
|
2784
|
+
/* … */
|
|
2785
|
+
/* function exit code */
|
|
2786
|
+
__pyx_L1_error:;
|
|
2787
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2788
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.nullable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2789
|
+
__pyx_r = NULL;
|
|
2790
|
+
__pyx_L0:;
|
|
2791
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2792
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2793
|
+
return __pyx_r;
|
|
2794
|
+
}
|
|
2795
|
+
/* … */
|
|
2796
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)</span>
|
|
2797
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
2798
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 245, __pyx_L1_error)</span>
|
|
2799
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_9nullable, 0, __pyx_n_s_Field_nullable, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__22));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)</span>
|
|
2800
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2801
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_2, __pyx_t_6);
|
|
2802
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2803
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_nullable, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 245, __pyx_L1_error)</span>
|
|
2804
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2805
|
+
/* … */
|
|
2806
|
+
__pyx_codeobj__22 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_nullable, 245, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 245, __pyx_L1_error)</span>
|
|
2807
|
+
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">246</span>: return self._nullable</pre>
|
|
2808
|
+
<pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2809
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_nullable_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)</span>
|
|
2810
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2811
|
+
__pyx_r = __pyx_t_1;
|
|
2812
|
+
__pyx_t_1 = 0;
|
|
2813
|
+
goto __pyx_L0;
|
|
2814
|
+
</pre><pre class="cython line score-0"> <span class="">247</span>: </pre>
|
|
2815
|
+
<pre class="cython line score-44" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">248</span>: def get_dbtype(self):</pre>
|
|
2816
|
+
<pre class='cython code score-44 '>/* Python wrapper */
|
|
2817
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_11get_dbtype(PyObject *__pyx_self,
|
|
2818
|
+
#if CYTHON_METH_FASTCALL
|
|
2819
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2820
|
+
#else
|
|
2821
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2822
|
+
#endif
|
|
2823
|
+
); /*proto*/
|
|
2824
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_10get_dbtype, "Field.get_dbtype(self)");
|
|
2825
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_11get_dbtype = {"get_dbtype", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_11get_dbtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_10get_dbtype};
|
|
2826
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_11get_dbtype(PyObject *__pyx_self,
|
|
2827
|
+
#if CYTHON_METH_FASTCALL
|
|
2828
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2829
|
+
#else
|
|
2830
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2831
|
+
#endif
|
|
2832
|
+
) {
|
|
2833
|
+
PyObject *__pyx_v_self = 0;
|
|
2834
|
+
#if !CYTHON_METH_FASTCALL
|
|
2835
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2836
|
+
#endif
|
|
2837
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2838
|
+
PyObject *__pyx_r = 0;
|
|
2839
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2840
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_dbtype (wrapper)", 0);
|
|
2841
|
+
#if !CYTHON_METH_FASTCALL
|
|
2842
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2843
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2844
|
+
#else
|
|
2845
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2846
|
+
#endif
|
|
2847
|
+
#endif
|
|
2848
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2849
|
+
{
|
|
2850
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
2851
|
+
PyObject* values[1] = {0};
|
|
2852
|
+
if (__pyx_kwds) {
|
|
2853
|
+
Py_ssize_t kw_args;
|
|
2854
|
+
switch (__pyx_nargs) {
|
|
2855
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2856
|
+
CYTHON_FALLTHROUGH;
|
|
2857
|
+
case 0: break;
|
|
2858
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2859
|
+
}
|
|
2860
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2861
|
+
switch (__pyx_nargs) {
|
|
2862
|
+
case 0:
|
|
2863
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
2864
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2865
|
+
kw_args--;
|
|
2866
|
+
}
|
|
2867
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 248, __pyx_L3_error)</span>
|
|
2868
|
+
else goto __pyx_L5_argtuple_error;
|
|
2869
|
+
}
|
|
2870
|
+
if (unlikely(kw_args > 0)) {
|
|
2871
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2872
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_dbtype") < 0)) <span class='error_goto'>__PYX_ERR(0, 248, __pyx_L3_error)</span>
|
|
2873
|
+
}
|
|
2874
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
2875
|
+
goto __pyx_L5_argtuple_error;
|
|
2876
|
+
} else {
|
|
2877
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2878
|
+
}
|
|
2879
|
+
__pyx_v_self = values[0];
|
|
2880
|
+
}
|
|
2881
|
+
goto __pyx_L6_skip;
|
|
2882
|
+
__pyx_L5_argtuple_error:;
|
|
2883
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get_dbtype", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 248, __pyx_L3_error)</span>
|
|
2884
|
+
__pyx_L6_skip:;
|
|
2885
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
2886
|
+
__pyx_L3_error:;
|
|
2887
|
+
{
|
|
2888
|
+
Py_ssize_t __pyx_temp;
|
|
2889
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2890
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.get_dbtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2894
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2895
|
+
return NULL;
|
|
2896
|
+
__pyx_L4_argument_unpacking_done:;
|
|
2897
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_10get_dbtype(__pyx_self, __pyx_v_self);
|
|
2898
|
+
int __pyx_lineno = 0;
|
|
2899
|
+
const char *__pyx_filename = NULL;
|
|
2900
|
+
int __pyx_clineno = 0;
|
|
2901
|
+
|
|
2902
|
+
/* function exit code */
|
|
2903
|
+
{
|
|
2904
|
+
Py_ssize_t __pyx_temp;
|
|
2905
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2906
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2910
|
+
return __pyx_r;
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_10get_dbtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
2914
|
+
PyObject *__pyx_r = NULL;
|
|
2915
|
+
/* … */
|
|
2916
|
+
/* function exit code */
|
|
2917
|
+
__pyx_L1_error:;
|
|
2918
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2919
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.get_dbtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2920
|
+
__pyx_r = NULL;
|
|
2921
|
+
__pyx_L0:;
|
|
2922
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2923
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2924
|
+
return __pyx_r;
|
|
2925
|
+
}
|
|
2926
|
+
/* … */
|
|
2927
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_11get_dbtype, 0, __pyx_n_s_Field_get_dbtype, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__23));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)</span>
|
|
2928
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2929
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_get_dbtype, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 248, __pyx_L1_error)</span>
|
|
2930
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2931
|
+
/* … */
|
|
2932
|
+
__pyx_codeobj__23 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_get_dbtype, 248, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 248, __pyx_L1_error)</span>
|
|
2933
|
+
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">249</span>: return self._dbtype</pre>
|
|
2934
|
+
<pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2935
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_dbtype);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)</span>
|
|
2936
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2937
|
+
__pyx_r = __pyx_t_1;
|
|
2938
|
+
__pyx_t_1 = 0;
|
|
2939
|
+
goto __pyx_L0;
|
|
2940
|
+
</pre><pre class="cython line score-0"> <span class="">250</span>: </pre>
|
|
2941
|
+
<pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">251</span>: def to_dict(self):</pre>
|
|
2942
|
+
<pre class='cython code score-46 '>/* Python wrapper */
|
|
2943
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_13to_dict(PyObject *__pyx_self,
|
|
2944
|
+
#if CYTHON_METH_FASTCALL
|
|
2945
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2946
|
+
#else
|
|
2947
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2948
|
+
#endif
|
|
2949
|
+
); /*proto*/
|
|
2950
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_12to_dict, "Field.to_dict(self)");
|
|
2951
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_13to_dict = {"to_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_13to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_12to_dict};
|
|
2952
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_13to_dict(PyObject *__pyx_self,
|
|
2953
|
+
#if CYTHON_METH_FASTCALL
|
|
2954
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2955
|
+
#else
|
|
2956
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2957
|
+
#endif
|
|
2958
|
+
) {
|
|
2959
|
+
PyObject *__pyx_v_self = 0;
|
|
2960
|
+
#if !CYTHON_METH_FASTCALL
|
|
2961
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2962
|
+
#endif
|
|
2963
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2964
|
+
PyObject *__pyx_r = 0;
|
|
2965
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2966
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("to_dict (wrapper)", 0);
|
|
2967
|
+
#if !CYTHON_METH_FASTCALL
|
|
2968
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2969
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2970
|
+
#else
|
|
2971
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2972
|
+
#endif
|
|
2973
|
+
#endif
|
|
2974
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2975
|
+
{
|
|
2976
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
2977
|
+
PyObject* values[1] = {0};
|
|
2978
|
+
if (__pyx_kwds) {
|
|
2979
|
+
Py_ssize_t kw_args;
|
|
2980
|
+
switch (__pyx_nargs) {
|
|
2981
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2982
|
+
CYTHON_FALLTHROUGH;
|
|
2983
|
+
case 0: break;
|
|
2984
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2985
|
+
}
|
|
2986
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2987
|
+
switch (__pyx_nargs) {
|
|
2988
|
+
case 0:
|
|
2989
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
2990
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2991
|
+
kw_args--;
|
|
2992
|
+
}
|
|
2993
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 251, __pyx_L3_error)</span>
|
|
2994
|
+
else goto __pyx_L5_argtuple_error;
|
|
2995
|
+
}
|
|
2996
|
+
if (unlikely(kw_args > 0)) {
|
|
2997
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2998
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "to_dict") < 0)) <span class='error_goto'>__PYX_ERR(0, 251, __pyx_L3_error)</span>
|
|
2999
|
+
}
|
|
3000
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
3001
|
+
goto __pyx_L5_argtuple_error;
|
|
3002
|
+
} else {
|
|
3003
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3004
|
+
}
|
|
3005
|
+
__pyx_v_self = values[0];
|
|
3006
|
+
}
|
|
3007
|
+
goto __pyx_L6_skip;
|
|
3008
|
+
__pyx_L5_argtuple_error:;
|
|
3009
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("to_dict", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 251, __pyx_L3_error)</span>
|
|
3010
|
+
__pyx_L6_skip:;
|
|
3011
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
3012
|
+
__pyx_L3_error:;
|
|
3013
|
+
{
|
|
3014
|
+
Py_ssize_t __pyx_temp;
|
|
3015
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3016
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3020
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3021
|
+
return NULL;
|
|
3022
|
+
__pyx_L4_argument_unpacking_done:;
|
|
3023
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_12to_dict(__pyx_self, __pyx_v_self);
|
|
3024
|
+
int __pyx_lineno = 0;
|
|
3025
|
+
const char *__pyx_filename = NULL;
|
|
3026
|
+
int __pyx_clineno = 0;
|
|
3027
|
+
|
|
3028
|
+
/* function exit code */
|
|
3029
|
+
{
|
|
3030
|
+
Py_ssize_t __pyx_temp;
|
|
3031
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3032
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3036
|
+
return __pyx_r;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_12to_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
3040
|
+
PyObject *__pyx_r = NULL;
|
|
3041
|
+
/* … */
|
|
3042
|
+
/* function exit code */
|
|
3043
|
+
__pyx_L1_error:;
|
|
3044
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
3045
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
3046
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
3047
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3048
|
+
__pyx_r = NULL;
|
|
3049
|
+
__pyx_L0:;
|
|
3050
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
3051
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3052
|
+
return __pyx_r;
|
|
3053
|
+
}
|
|
3054
|
+
/* … */
|
|
3055
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_13to_dict, 0, __pyx_n_s_Field_to_dict, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)</span>
|
|
3056
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3057
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_to_dict, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 251, __pyx_L1_error)</span>
|
|
3058
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3059
|
+
/* … */
|
|
3060
|
+
__pyx_codeobj__24 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_to_dict, 251, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 251, __pyx_L1_error)</span>
|
|
3061
|
+
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">252</span>: return {</pre>
|
|
3062
|
+
<pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3063
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">253</span>: "name": self.name,</pre>
|
|
3064
|
+
<pre class='cython code score-10 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3065
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3066
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3067
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3068
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_name, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3069
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3070
|
+
</pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">254</span>: "type": str(self.type),</pre>
|
|
3071
|
+
<pre class='cython code score-11 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_type);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)</span>
|
|
3072
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3073
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Unicode</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)</span>
|
|
3074
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3075
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3076
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_type, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3077
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3078
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">255</span>: "default": self.default,</pre>
|
|
3079
|
+
<pre class='cython code score-8 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_default);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)</span>
|
|
3080
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3081
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_default, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3082
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3083
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">256</span>: "required": self._required,</pre>
|
|
3084
|
+
<pre class='cython code score-8 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_required_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)</span>
|
|
3085
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3086
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_required, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3087
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3088
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">257</span>: "primary": self._primary</pre>
|
|
3089
|
+
<pre class='cython code score-8 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_primary);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)</span>
|
|
3090
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3091
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_u_primary_2, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 253, __pyx_L1_error)</span>
|
|
3092
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3093
|
+
__pyx_r = __pyx_t_1;
|
|
3094
|
+
__pyx_t_1 = 0;
|
|
3095
|
+
goto __pyx_L0;
|
|
3096
|
+
</pre><pre class="cython line score-0"> <span class="">258</span>: }</pre>
|
|
3097
|
+
<pre class="cython line score-0"> <span class="">259</span>: </pre>
|
|
3098
|
+
<pre class="cython line score-52" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">260</span>: def db_type(self):</pre>
|
|
3099
|
+
<pre class='cython code score-52 '>/* Python wrapper */
|
|
3100
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_15db_type(PyObject *__pyx_self,
|
|
3101
|
+
#if CYTHON_METH_FASTCALL
|
|
3102
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3103
|
+
#else
|
|
3104
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3105
|
+
#endif
|
|
3106
|
+
); /*proto*/
|
|
3107
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_14db_type, "Field.db_type(self)");
|
|
3108
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_15db_type = {"db_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_15db_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_14db_type};
|
|
3109
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_15db_type(PyObject *__pyx_self,
|
|
3110
|
+
#if CYTHON_METH_FASTCALL
|
|
3111
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3112
|
+
#else
|
|
3113
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3114
|
+
#endif
|
|
3115
|
+
) {
|
|
3116
|
+
PyObject *__pyx_v_self = 0;
|
|
3117
|
+
#if !CYTHON_METH_FASTCALL
|
|
3118
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
3119
|
+
#endif
|
|
3120
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
3121
|
+
PyObject *__pyx_r = 0;
|
|
3122
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
3123
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("db_type (wrapper)", 0);
|
|
3124
|
+
#if !CYTHON_METH_FASTCALL
|
|
3125
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
3126
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
3127
|
+
#else
|
|
3128
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
3129
|
+
#endif
|
|
3130
|
+
#endif
|
|
3131
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
3132
|
+
{
|
|
3133
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
3134
|
+
PyObject* values[1] = {0};
|
|
3135
|
+
if (__pyx_kwds) {
|
|
3136
|
+
Py_ssize_t kw_args;
|
|
3137
|
+
switch (__pyx_nargs) {
|
|
3138
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3139
|
+
CYTHON_FALLTHROUGH;
|
|
3140
|
+
case 0: break;
|
|
3141
|
+
default: goto __pyx_L5_argtuple_error;
|
|
3142
|
+
}
|
|
3143
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
3144
|
+
switch (__pyx_nargs) {
|
|
3145
|
+
case 0:
|
|
3146
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
3147
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
3148
|
+
kw_args--;
|
|
3149
|
+
}
|
|
3150
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 260, __pyx_L3_error)</span>
|
|
3151
|
+
else goto __pyx_L5_argtuple_error;
|
|
3152
|
+
}
|
|
3153
|
+
if (unlikely(kw_args > 0)) {
|
|
3154
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3155
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "db_type") < 0)) <span class='error_goto'>__PYX_ERR(0, 260, __pyx_L3_error)</span>
|
|
3156
|
+
}
|
|
3157
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
3158
|
+
goto __pyx_L5_argtuple_error;
|
|
3159
|
+
} else {
|
|
3160
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3161
|
+
}
|
|
3162
|
+
__pyx_v_self = values[0];
|
|
3163
|
+
}
|
|
3164
|
+
goto __pyx_L6_skip;
|
|
3165
|
+
__pyx_L5_argtuple_error:;
|
|
3166
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("db_type", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 260, __pyx_L3_error)</span>
|
|
3167
|
+
__pyx_L6_skip:;
|
|
3168
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
3169
|
+
__pyx_L3_error:;
|
|
3170
|
+
{
|
|
3171
|
+
Py_ssize_t __pyx_temp;
|
|
3172
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3173
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.db_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3177
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3178
|
+
return NULL;
|
|
3179
|
+
__pyx_L4_argument_unpacking_done:;
|
|
3180
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_14db_type(__pyx_self, __pyx_v_self);
|
|
3181
|
+
int __pyx_lineno = 0;
|
|
3182
|
+
const char *__pyx_filename = NULL;
|
|
3183
|
+
int __pyx_clineno = 0;
|
|
3184
|
+
|
|
3185
|
+
/* function exit code */
|
|
3186
|
+
{
|
|
3187
|
+
Py_ssize_t __pyx_temp;
|
|
3188
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3189
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3193
|
+
return __pyx_r;
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_14db_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
3197
|
+
PyObject *__pyx_v_t = NULL;
|
|
3198
|
+
PyObject *__pyx_r = NULL;
|
|
3199
|
+
/* … */
|
|
3200
|
+
/* function exit code */
|
|
3201
|
+
__pyx_L1_error:;
|
|
3202
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
3203
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
3204
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
3205
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.db_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3206
|
+
__pyx_r = NULL;
|
|
3207
|
+
__pyx_L0:;
|
|
3208
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_t);
|
|
3209
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
3210
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3211
|
+
return __pyx_r;
|
|
3212
|
+
}
|
|
3213
|
+
/* … */
|
|
3214
|
+
__pyx_tuple__25 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_t);<span class='error_goto'> if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 260, __pyx_L1_error)</span>
|
|
3215
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__25);
|
|
3216
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__25);
|
|
3217
|
+
/* … */
|
|
3218
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_15db_type, 0, __pyx_n_s_Field_db_type, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__26));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)</span>
|
|
3219
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3220
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_db_type, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 260, __pyx_L1_error)</span>
|
|
3221
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3222
|
+
__pyx_codeobj__26 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_db_type, 260, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 260, __pyx_L1_error)</span>
|
|
3223
|
+
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">261</span>: if self._dbtype is not None:</pre>
|
|
3224
|
+
<pre class='cython code score-3 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_dbtype);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)</span>
|
|
3225
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3226
|
+
__pyx_t_2 = (__pyx_t_1 != Py_None);
|
|
3227
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
3228
|
+
if (__pyx_t_2) {
|
|
3229
|
+
/* … */
|
|
3230
|
+
}
|
|
3231
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">262</span>: if self._dbtype == "array":</pre>
|
|
3232
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_dbtype);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)</span>
|
|
3233
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3234
|
+
__pyx_t_2 = (<span class='pyx_c_api'>__Pyx_PyUnicode_Equals</span>(__pyx_t_1, __pyx_n_u_array, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) <span class='error_goto'>__PYX_ERR(0, 262, __pyx_L1_error)</span>
|
|
3235
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
3236
|
+
if (__pyx_t_2) {
|
|
3237
|
+
/* … */
|
|
3238
|
+
}
|
|
3239
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">263</span>: t = DB_TYPES[self.type]</pre>
|
|
3240
|
+
<pre class='cython code score-8 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_DB_TYPES);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)</span>
|
|
3241
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3242
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_type);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)</span>
|
|
3243
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3244
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(__pyx_t_1, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)</span>
|
|
3245
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
3246
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
3247
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3248
|
+
__pyx_v_t = __pyx_t_4;
|
|
3249
|
+
__pyx_t_4 = 0;
|
|
3250
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">264</span>: return f"{t}[]"</pre>
|
|
3251
|
+
<pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3252
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_v_t, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)</span>
|
|
3253
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
3254
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyUnicode_ConcatInPlace</span>(__pyx_t_4, __pyx_kp_u__7);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)</span>
|
|
3255
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3256
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
3257
|
+
__pyx_r = __pyx_t_3;
|
|
3258
|
+
__pyx_t_3 = 0;
|
|
3259
|
+
goto __pyx_L0;
|
|
3260
|
+
</pre><pre class="cython line score-0"> <span class="">265</span>: else:</pre>
|
|
3261
|
+
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">266</span>: return self._dbtype</pre>
|
|
3262
|
+
<pre class='cython code score-3 '> /*else*/ {
|
|
3263
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3264
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_dbtype);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)</span>
|
|
3265
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3266
|
+
__pyx_r = __pyx_t_3;
|
|
3267
|
+
__pyx_t_3 = 0;
|
|
3268
|
+
goto __pyx_L0;
|
|
3269
|
+
}
|
|
3270
|
+
</pre><pre class="cython line score-0"> <span class="">267</span>: else:</pre>
|
|
3271
|
+
<pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">268</span>: try:</pre>
|
|
3272
|
+
<pre class='cython code score-9 '> /*else*/ {
|
|
3273
|
+
{
|
|
3274
|
+
/*try:*/ {
|
|
3275
|
+
/* … */
|
|
3276
|
+
}
|
|
3277
|
+
__pyx_L5_error:;
|
|
3278
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
3279
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3280
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
3281
|
+
/* … */
|
|
3282
|
+
__pyx_L7_except_error:;
|
|
3283
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_5);
|
|
3284
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6);
|
|
3285
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
3286
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
3287
|
+
goto __pyx_L1_error;
|
|
3288
|
+
__pyx_L9_try_return:;
|
|
3289
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_5);
|
|
3290
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6);
|
|
3291
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
3292
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
3293
|
+
goto __pyx_L0;
|
|
3294
|
+
__pyx_L8_except_return:;
|
|
3295
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_5);
|
|
3296
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6);
|
|
3297
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
3298
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
3299
|
+
goto __pyx_L0;
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
</pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">269</span>: return DB_TYPES[self.type]</pre>
|
|
3303
|
+
<pre class='cython code score-9 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3304
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_DB_TYPES);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L5_error)</span>
|
|
3305
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3306
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_type);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L5_error)</span>
|
|
3307
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
3308
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(__pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L5_error)</span>
|
|
3309
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3310
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3311
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
3312
|
+
__pyx_r = __pyx_t_1;
|
|
3313
|
+
__pyx_t_1 = 0;
|
|
3314
|
+
goto __pyx_L9_try_return;
|
|
3315
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">270</span>: except KeyError:</pre>
|
|
3316
|
+
<pre class='cython code score-6 '> __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_KeyError);
|
|
3317
|
+
if (__pyx_t_8) {
|
|
3318
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.db_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3319
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 270, __pyx_L7_except_error)</span>
|
|
3320
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);
|
|
3321
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_4);
|
|
3322
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_3);
|
|
3323
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">271</span>: return 'varchar'</pre>
|
|
3324
|
+
<pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3325
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_u_varchar);
|
|
3326
|
+
__pyx_r = __pyx_n_u_varchar;
|
|
3327
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
3328
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3329
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
3330
|
+
goto __pyx_L8_except_return;
|
|
3331
|
+
}
|
|
3332
|
+
goto __pyx_L7_except_error;
|
|
3333
|
+
</pre><pre class="cython line score-0"> <span class="">272</span>: </pre>
|
|
3334
|
+
<pre class="cython line score-57" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">273</span>: @property</pre>
|
|
3335
|
+
<pre class='cython code score-57 '>/* Python wrapper */
|
|
3336
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_17typeinfo(PyObject *__pyx_self,
|
|
3337
|
+
#if CYTHON_METH_FASTCALL
|
|
3338
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3339
|
+
#else
|
|
3340
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3341
|
+
#endif
|
|
3342
|
+
); /*proto*/
|
|
3343
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_16typeinfo, "Field.typeinfo(self) -> dict");
|
|
3344
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_17typeinfo = {"typeinfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_17typeinfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_16typeinfo};
|
|
3345
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_17typeinfo(PyObject *__pyx_self,
|
|
3346
|
+
#if CYTHON_METH_FASTCALL
|
|
3347
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3348
|
+
#else
|
|
3349
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3350
|
+
#endif
|
|
3351
|
+
) {
|
|
3352
|
+
PyObject *__pyx_v_self = 0;
|
|
3353
|
+
#if !CYTHON_METH_FASTCALL
|
|
3354
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
3355
|
+
#endif
|
|
3356
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
3357
|
+
PyObject *__pyx_r = 0;
|
|
3358
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
3359
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("typeinfo (wrapper)", 0);
|
|
3360
|
+
#if !CYTHON_METH_FASTCALL
|
|
3361
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
3362
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
3363
|
+
#else
|
|
3364
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
3365
|
+
#endif
|
|
3366
|
+
#endif
|
|
3367
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
3368
|
+
{
|
|
3369
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
3370
|
+
PyObject* values[1] = {0};
|
|
3371
|
+
if (__pyx_kwds) {
|
|
3372
|
+
Py_ssize_t kw_args;
|
|
3373
|
+
switch (__pyx_nargs) {
|
|
3374
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3375
|
+
CYTHON_FALLTHROUGH;
|
|
3376
|
+
case 0: break;
|
|
3377
|
+
default: goto __pyx_L5_argtuple_error;
|
|
3378
|
+
}
|
|
3379
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
3380
|
+
switch (__pyx_nargs) {
|
|
3381
|
+
case 0:
|
|
3382
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
3383
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
3384
|
+
kw_args--;
|
|
3385
|
+
}
|
|
3386
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 273, __pyx_L3_error)</span>
|
|
3387
|
+
else goto __pyx_L5_argtuple_error;
|
|
3388
|
+
}
|
|
3389
|
+
if (unlikely(kw_args > 0)) {
|
|
3390
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3391
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "typeinfo") < 0)) <span class='error_goto'>__PYX_ERR(0, 273, __pyx_L3_error)</span>
|
|
3392
|
+
}
|
|
3393
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
3394
|
+
goto __pyx_L5_argtuple_error;
|
|
3395
|
+
} else {
|
|
3396
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3397
|
+
}
|
|
3398
|
+
__pyx_v_self = values[0];
|
|
3399
|
+
}
|
|
3400
|
+
goto __pyx_L6_skip;
|
|
3401
|
+
__pyx_L5_argtuple_error:;
|
|
3402
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("typeinfo", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 273, __pyx_L3_error)</span>
|
|
3403
|
+
__pyx_L6_skip:;
|
|
3404
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
3405
|
+
__pyx_L3_error:;
|
|
3406
|
+
{
|
|
3407
|
+
Py_ssize_t __pyx_temp;
|
|
3408
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3409
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3413
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3414
|
+
return NULL;
|
|
3415
|
+
__pyx_L4_argument_unpacking_done:;
|
|
3416
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_16typeinfo(__pyx_self, __pyx_v_self);
|
|
3417
|
+
int __pyx_lineno = 0;
|
|
3418
|
+
const char *__pyx_filename = NULL;
|
|
3419
|
+
int __pyx_clineno = 0;
|
|
3420
|
+
|
|
3421
|
+
/* function exit code */
|
|
3422
|
+
{
|
|
3423
|
+
Py_ssize_t __pyx_temp;
|
|
3424
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3425
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3429
|
+
return __pyx_r;
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_16typeinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
3433
|
+
PyObject *__pyx_r = NULL;
|
|
3434
|
+
/* … */
|
|
3435
|
+
/* function exit code */
|
|
3436
|
+
__pyx_L1_error:;
|
|
3437
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
3438
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3439
|
+
__pyx_r = NULL;
|
|
3440
|
+
__pyx_L0:;
|
|
3441
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
3442
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3443
|
+
return __pyx_r;
|
|
3444
|
+
}
|
|
3445
|
+
/* … */
|
|
3446
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)</span>
|
|
3447
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3448
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_dict) < 0) <span class='error_goto'>__PYX_ERR(0, 273, __pyx_L1_error)</span>
|
|
3449
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_17typeinfo, 0, __pyx_n_s_Field_typeinfo, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__27));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)</span>
|
|
3450
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
3451
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_6, __pyx_t_2);
|
|
3452
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3453
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_property, __pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)</span>
|
|
3454
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3455
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
3456
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_typeinfo_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 273, __pyx_L1_error)</span>
|
|
3457
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3458
|
+
/* … */
|
|
3459
|
+
__pyx_codeobj__27 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_typeinfo_2, 273, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 273, __pyx_L1_error)</span>
|
|
3460
|
+
</pre><pre class="cython line score-0"> <span class="">274</span>: def typeinfo(self) -> dict:</pre>
|
|
3461
|
+
<pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">275</span>: return self._typeinfo_</pre>
|
|
3462
|
+
<pre class='cython code score-10 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3463
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_typeinfo);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error)</span>
|
|
3464
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3465
|
+
if (!(likely(<span class='py_c_api'>PyDict_CheckExact</span>(__pyx_t_1))||((__pyx_t_1) == Py_None) || <span class='pyx_c_api'>__Pyx_RaiseUnexpectedTypeError</span>("dict", __pyx_t_1))) <span class='error_goto'>__PYX_ERR(0, 275, __pyx_L1_error)</span>
|
|
3466
|
+
__pyx_r = ((PyObject*)__pyx_t_1);
|
|
3467
|
+
__pyx_t_1 = 0;
|
|
3468
|
+
goto __pyx_L0;
|
|
3469
|
+
</pre><pre class="cython line score-0"> <span class="">276</span>: </pre>
|
|
3470
|
+
<pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">277</span>: @property</pre>
|
|
3471
|
+
<pre class='cython code score-47 '>/* Python wrapper */
|
|
3472
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_19primary_key(PyObject *__pyx_self,
|
|
3473
|
+
#if CYTHON_METH_FASTCALL
|
|
3474
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3475
|
+
#else
|
|
3476
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3477
|
+
#endif
|
|
3478
|
+
); /*proto*/
|
|
3479
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_5Field_18primary_key, "Field.primary_key(self)");
|
|
3480
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Field_19primary_key = {"primary_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Field_19primary_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_5Field_18primary_key};
|
|
3481
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Field_19primary_key(PyObject *__pyx_self,
|
|
3482
|
+
#if CYTHON_METH_FASTCALL
|
|
3483
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3484
|
+
#else
|
|
3485
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3486
|
+
#endif
|
|
3487
|
+
) {
|
|
3488
|
+
PyObject *__pyx_v_self = 0;
|
|
3489
|
+
#if !CYTHON_METH_FASTCALL
|
|
3490
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
3491
|
+
#endif
|
|
3492
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
3493
|
+
PyObject *__pyx_r = 0;
|
|
3494
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
3495
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("primary_key (wrapper)", 0);
|
|
3496
|
+
#if !CYTHON_METH_FASTCALL
|
|
3497
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
3498
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
3499
|
+
#else
|
|
3500
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
3501
|
+
#endif
|
|
3502
|
+
#endif
|
|
3503
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
3504
|
+
{
|
|
3505
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
|
|
3506
|
+
PyObject* values[1] = {0};
|
|
3507
|
+
if (__pyx_kwds) {
|
|
3508
|
+
Py_ssize_t kw_args;
|
|
3509
|
+
switch (__pyx_nargs) {
|
|
3510
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3511
|
+
CYTHON_FALLTHROUGH;
|
|
3512
|
+
case 0: break;
|
|
3513
|
+
default: goto __pyx_L5_argtuple_error;
|
|
3514
|
+
}
|
|
3515
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
3516
|
+
switch (__pyx_nargs) {
|
|
3517
|
+
case 0:
|
|
3518
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
|
|
3519
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
3520
|
+
kw_args--;
|
|
3521
|
+
}
|
|
3522
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 277, __pyx_L3_error)</span>
|
|
3523
|
+
else goto __pyx_L5_argtuple_error;
|
|
3524
|
+
}
|
|
3525
|
+
if (unlikely(kw_args > 0)) {
|
|
3526
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3527
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "primary_key") < 0)) <span class='error_goto'>__PYX_ERR(0, 277, __pyx_L3_error)</span>
|
|
3528
|
+
}
|
|
3529
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
3530
|
+
goto __pyx_L5_argtuple_error;
|
|
3531
|
+
} else {
|
|
3532
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3533
|
+
}
|
|
3534
|
+
__pyx_v_self = values[0];
|
|
3535
|
+
}
|
|
3536
|
+
goto __pyx_L6_skip;
|
|
3537
|
+
__pyx_L5_argtuple_error:;
|
|
3538
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("primary_key", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 277, __pyx_L3_error)</span>
|
|
3539
|
+
__pyx_L6_skip:;
|
|
3540
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
3541
|
+
__pyx_L3_error:;
|
|
3542
|
+
{
|
|
3543
|
+
Py_ssize_t __pyx_temp;
|
|
3544
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3545
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.primary_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3549
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3550
|
+
return NULL;
|
|
3551
|
+
__pyx_L4_argument_unpacking_done:;
|
|
3552
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_5Field_18primary_key(__pyx_self, __pyx_v_self);
|
|
3553
|
+
int __pyx_lineno = 0;
|
|
3554
|
+
const char *__pyx_filename = NULL;
|
|
3555
|
+
int __pyx_clineno = 0;
|
|
3556
|
+
|
|
3557
|
+
/* function exit code */
|
|
3558
|
+
{
|
|
3559
|
+
Py_ssize_t __pyx_temp;
|
|
3560
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3561
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3565
|
+
return __pyx_r;
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
static PyObject *__pyx_pf_9datamodel_6fields_5Field_18primary_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
|
|
3569
|
+
PyObject *__pyx_r = NULL;
|
|
3570
|
+
/* … */
|
|
3571
|
+
/* function exit code */
|
|
3572
|
+
__pyx_L1_error:;
|
|
3573
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
3574
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Field.primary_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3575
|
+
__pyx_r = NULL;
|
|
3576
|
+
__pyx_L0:;
|
|
3577
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
3578
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3579
|
+
return __pyx_r;
|
|
3580
|
+
}
|
|
3581
|
+
/* … */
|
|
3582
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Field_19primary_key, 0, __pyx_n_s_Field_primary_key, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__28));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)</span>
|
|
3583
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
3584
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_property, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error)</span>
|
|
3585
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
3586
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3587
|
+
if (<span class='pyx_c_api'>__Pyx_SetNameInClass</span>(__pyx_t_5, __pyx_n_s_primary_key, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 277, __pyx_L1_error)</span>
|
|
3588
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
3589
|
+
/* … */
|
|
3590
|
+
__pyx_codeobj__28 = (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__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_primary_key, 277, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 277, __pyx_L1_error)</span>
|
|
3591
|
+
</pre><pre class="cython line score-0"> <span class="">278</span>: def primary_key(self):</pre>
|
|
3592
|
+
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">279</span>: return self._primary</pre>
|
|
3593
|
+
<pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3594
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self, __pyx_n_s_primary);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)</span>
|
|
3595
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3596
|
+
__pyx_r = __pyx_t_1;
|
|
3597
|
+
__pyx_t_1 = 0;
|
|
3598
|
+
goto __pyx_L0;
|
|
3599
|
+
</pre><pre class="cython line score-0"> <span class="">280</span>: </pre>
|
|
3600
|
+
<pre class="cython line score-0"> <span class="">281</span>: </pre>
|
|
3601
|
+
<pre class="cython line score-89" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">282</span>: def Column(</pre>
|
|
3602
|
+
<pre class='cython code score-89 '>/* Python wrapper */
|
|
3603
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Column(PyObject *__pyx_self,
|
|
3604
|
+
#if CYTHON_METH_FASTCALL
|
|
3605
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3606
|
+
#else
|
|
3607
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3608
|
+
#endif
|
|
3609
|
+
); /*proto*/
|
|
3610
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_6fields_4Column, "Column(default: Optional[Callable] = None, nullable: bool = True, required: bool = False, factory: Optional[Callable] = None, min: Union[int, float] = None, max: Union[int, float] = None, validator: Optional[Callable] = None, kw_only: bool = False, unicode alias: Optional[str] = None, **kwargs)\n\n Column.\n DataModel Function that returns a Field() object\n ");
|
|
3611
|
+
static PyMethodDef __pyx_mdef_9datamodel_6fields_5Column = {"Column", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_6fields_5Column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_6fields_4Column};
|
|
3612
|
+
static PyObject *__pyx_pw_9datamodel_6fields_5Column(PyObject *__pyx_self,
|
|
3613
|
+
#if CYTHON_METH_FASTCALL
|
|
3614
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
3615
|
+
#else
|
|
3616
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
3617
|
+
#endif
|
|
3618
|
+
) {
|
|
3619
|
+
PyObject *__pyx_v_default = 0;
|
|
3620
|
+
PyObject *__pyx_v_nullable = 0;
|
|
3621
|
+
PyObject *__pyx_v_required = 0;
|
|
3622
|
+
PyObject *__pyx_v_factory = 0;
|
|
3623
|
+
PyObject *__pyx_v_min = 0;
|
|
3624
|
+
PyObject *__pyx_v_max = 0;
|
|
3625
|
+
PyObject *__pyx_v_validator = 0;
|
|
3626
|
+
PyObject *__pyx_v_kw_only = 0;
|
|
3627
|
+
PyObject *__pyx_v_alias = 0;
|
|
3628
|
+
PyObject *__pyx_v_kwargs = 0;
|
|
3629
|
+
#if !CYTHON_METH_FASTCALL
|
|
3630
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
3631
|
+
#endif
|
|
3632
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
3633
|
+
PyObject *__pyx_r = 0;
|
|
3634
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
3635
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("Column (wrapper)", 0);
|
|
3636
|
+
#if !CYTHON_METH_FASTCALL
|
|
3637
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
3638
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
3639
|
+
#else
|
|
3640
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
3641
|
+
#endif
|
|
3642
|
+
#endif
|
|
3643
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
3644
|
+
__pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
3645
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs);
|
|
3646
|
+
{
|
|
3647
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_default,&__pyx_n_s_nullable,&__pyx_n_s_required,&__pyx_n_s_factory,&__pyx_n_s_min,&__pyx_n_s_max,&__pyx_n_s_validator,&__pyx_n_s_kw_only,&__pyx_n_s_alias,0};
|
|
3648
|
+
PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
|
|
3649
|
+
/* … */
|
|
3650
|
+
/* function exit code */
|
|
3651
|
+
goto __pyx_L0;
|
|
3652
|
+
__pyx_L1_error:;
|
|
3653
|
+
__pyx_r = NULL;
|
|
3654
|
+
__pyx_L0:;
|
|
3655
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs);
|
|
3656
|
+
{
|
|
3657
|
+
Py_ssize_t __pyx_temp;
|
|
3658
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3659
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3663
|
+
return __pyx_r;
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
static PyObject *__pyx_pf_9datamodel_6fields_4Column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_default, PyObject *__pyx_v_nullable, PyObject *__pyx_v_required, PyObject *__pyx_v_factory, PyObject *__pyx_v_min, PyObject *__pyx_v_max, PyObject *__pyx_v_validator, PyObject *__pyx_v_kw_only, PyObject *__pyx_v_alias, PyObject *__pyx_v_kwargs) {
|
|
3667
|
+
PyObject *__pyx_r = NULL;
|
|
3668
|
+
/* … */
|
|
3669
|
+
/* function exit code */
|
|
3670
|
+
__pyx_L1_error:;
|
|
3671
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
3672
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
3673
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
3674
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Column", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3675
|
+
__pyx_r = NULL;
|
|
3676
|
+
__pyx_L0:;
|
|
3677
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
3678
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3679
|
+
return __pyx_r;
|
|
3680
|
+
}
|
|
3681
|
+
/* … */
|
|
3682
|
+
__pyx_tuple__29 = <span class='py_c_api'>PyTuple_Pack</span>(10, __pyx_n_s_default, __pyx_n_s_nullable, __pyx_n_s_required, __pyx_n_s_factory, __pyx_n_s_min, __pyx_n_s_max, __pyx_n_s_validator, __pyx_n_s_kw_only, __pyx_n_s_alias, __pyx_n_s_kwargs);<span class='error_goto'> if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3683
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__29);
|
|
3684
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__29);
|
|
3685
|
+
__pyx_codeobj__30 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(9, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_fields_pyx, __pyx_n_s_Column, 282, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3686
|
+
/* … */
|
|
3687
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(9);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3688
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3689
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_default, __pyx_kp_s_Optional_Callable) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3690
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_nullable, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3691
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_required, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3692
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_factory, __pyx_kp_s_Optional_Callable) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3693
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_min, __pyx_kp_s_Union_int_float) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3694
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_max, __pyx_kp_s_Union_int_float) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3695
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_validator, __pyx_kp_s_Optional_Callable) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3696
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_kw_only, __pyx_n_s_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3697
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_alias, __pyx_kp_s_Optional_str) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3698
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_6fields_5Column, 0, __pyx_n_s_Column, NULL, __pyx_n_s_datamodel_fields, __pyx_d, ((PyObject *)__pyx_codeobj__30));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3699
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
3700
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_4, __pyx_tuple__31);
|
|
3701
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3);
|
|
3702
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
3703
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Column, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L1_error)</span>
|
|
3704
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
3705
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">283</span>: default: Optional[Callable] = None,</pre>
|
|
3706
|
+
<pre class='cython code score-2 '> values[0] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
3707
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">284</span>: nullable: bool = True,</pre>
|
|
3708
|
+
<pre class='cython code score-2 '> values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)((PyObject *)Py_True)));
|
|
3709
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">285</span>: required: bool = False,</pre>
|
|
3710
|
+
<pre class='cython code score-2 '> values[2] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)((PyObject *)Py_False)));
|
|
3711
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">286</span>: factory: Optional[Callable] = None,</pre>
|
|
3712
|
+
<pre class='cython code score-2 '> values[3] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
3713
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">287</span>: min: Union[int, float] = None,</pre>
|
|
3714
|
+
<pre class='cython code score-2 '> values[4] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
3715
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">288</span>: max: Union[int, float] = None,</pre>
|
|
3716
|
+
<pre class='cython code score-2 '> values[5] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
3717
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">289</span>: validator: Optional[Callable] = None,</pre>
|
|
3718
|
+
<pre class='cython code score-2 '> values[6] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
3719
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">290</span>: kw_only: bool = False,</pre>
|
|
3720
|
+
<pre class='cython code score-2 '> values[7] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)((PyObject *)Py_False)));
|
|
3721
|
+
</pre><pre class="cython line score-132" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">291</span>: alias: Optional[str] = None,</pre>
|
|
3722
|
+
<pre class='cython code score-132 '> values[8] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject*)Py_None));
|
|
3723
|
+
if (__pyx_kwds) {
|
|
3724
|
+
Py_ssize_t kw_args;
|
|
3725
|
+
switch (__pyx_nargs) {
|
|
3726
|
+
case 9: values[8] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 8);
|
|
3727
|
+
CYTHON_FALLTHROUGH;
|
|
3728
|
+
case 8: values[7] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 7);
|
|
3729
|
+
CYTHON_FALLTHROUGH;
|
|
3730
|
+
case 7: values[6] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 6);
|
|
3731
|
+
CYTHON_FALLTHROUGH;
|
|
3732
|
+
case 6: values[5] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 5);
|
|
3733
|
+
CYTHON_FALLTHROUGH;
|
|
3734
|
+
case 5: values[4] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 4);
|
|
3735
|
+
CYTHON_FALLTHROUGH;
|
|
3736
|
+
case 4: values[3] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 3);
|
|
3737
|
+
CYTHON_FALLTHROUGH;
|
|
3738
|
+
case 3: values[2] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 2);
|
|
3739
|
+
CYTHON_FALLTHROUGH;
|
|
3740
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
3741
|
+
CYTHON_FALLTHROUGH;
|
|
3742
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3743
|
+
CYTHON_FALLTHROUGH;
|
|
3744
|
+
case 0: break;
|
|
3745
|
+
default: goto __pyx_L5_argtuple_error;
|
|
3746
|
+
}
|
|
3747
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
3748
|
+
switch (__pyx_nargs) {
|
|
3749
|
+
case 0:
|
|
3750
|
+
if (kw_args > 0) {
|
|
3751
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
|
|
3752
|
+
if (value) { values[0] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3753
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3754
|
+
}
|
|
3755
|
+
CYTHON_FALLTHROUGH;
|
|
3756
|
+
case 1:
|
|
3757
|
+
if (kw_args > 0) {
|
|
3758
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nullable);
|
|
3759
|
+
if (value) { values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3760
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3761
|
+
}
|
|
3762
|
+
CYTHON_FALLTHROUGH;
|
|
3763
|
+
case 2:
|
|
3764
|
+
if (kw_args > 0) {
|
|
3765
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_required);
|
|
3766
|
+
if (value) { values[2] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3767
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3768
|
+
}
|
|
3769
|
+
CYTHON_FALLTHROUGH;
|
|
3770
|
+
case 3:
|
|
3771
|
+
if (kw_args > 0) {
|
|
3772
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_factory);
|
|
3773
|
+
if (value) { values[3] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3774
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3775
|
+
}
|
|
3776
|
+
CYTHON_FALLTHROUGH;
|
|
3777
|
+
case 4:
|
|
3778
|
+
if (kw_args > 0) {
|
|
3779
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min);
|
|
3780
|
+
if (value) { values[4] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3781
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3782
|
+
}
|
|
3783
|
+
CYTHON_FALLTHROUGH;
|
|
3784
|
+
case 5:
|
|
3785
|
+
if (kw_args > 0) {
|
|
3786
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max);
|
|
3787
|
+
if (value) { values[5] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3788
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3789
|
+
}
|
|
3790
|
+
CYTHON_FALLTHROUGH;
|
|
3791
|
+
case 6:
|
|
3792
|
+
if (kw_args > 0) {
|
|
3793
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_validator);
|
|
3794
|
+
if (value) { values[6] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3795
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3796
|
+
}
|
|
3797
|
+
CYTHON_FALLTHROUGH;
|
|
3798
|
+
case 7:
|
|
3799
|
+
if (kw_args > 0) {
|
|
3800
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kw_only);
|
|
3801
|
+
if (value) { values[7] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3802
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3803
|
+
}
|
|
3804
|
+
CYTHON_FALLTHROUGH;
|
|
3805
|
+
case 8:
|
|
3806
|
+
if (kw_args > 0) {
|
|
3807
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alias);
|
|
3808
|
+
if (value) { values[8] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
3809
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
if (unlikely(kw_args > 0)) {
|
|
3813
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3814
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "Column") < 0)) <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3815
|
+
}
|
|
3816
|
+
} else {
|
|
3817
|
+
switch (__pyx_nargs) {
|
|
3818
|
+
case 9: values[8] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 8);
|
|
3819
|
+
CYTHON_FALLTHROUGH;
|
|
3820
|
+
case 8: values[7] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 7);
|
|
3821
|
+
CYTHON_FALLTHROUGH;
|
|
3822
|
+
case 7: values[6] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 6);
|
|
3823
|
+
CYTHON_FALLTHROUGH;
|
|
3824
|
+
case 6: values[5] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 5);
|
|
3825
|
+
CYTHON_FALLTHROUGH;
|
|
3826
|
+
case 5: values[4] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 4);
|
|
3827
|
+
CYTHON_FALLTHROUGH;
|
|
3828
|
+
case 4: values[3] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 3);
|
|
3829
|
+
CYTHON_FALLTHROUGH;
|
|
3830
|
+
case 3: values[2] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 2);
|
|
3831
|
+
CYTHON_FALLTHROUGH;
|
|
3832
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
3833
|
+
CYTHON_FALLTHROUGH;
|
|
3834
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
3835
|
+
CYTHON_FALLTHROUGH;
|
|
3836
|
+
case 0: break;
|
|
3837
|
+
default: goto __pyx_L5_argtuple_error;
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
__pyx_v_default = values[0];
|
|
3841
|
+
__pyx_v_nullable = values[1];
|
|
3842
|
+
__pyx_v_required = values[2];
|
|
3843
|
+
__pyx_v_factory = values[3];
|
|
3844
|
+
__pyx_v_min = values[4];
|
|
3845
|
+
__pyx_v_max = values[5];
|
|
3846
|
+
__pyx_v_validator = values[6];
|
|
3847
|
+
__pyx_v_kw_only = values[7];
|
|
3848
|
+
__pyx_v_alias = ((PyObject*)values[8]);
|
|
3849
|
+
}
|
|
3850
|
+
goto __pyx_L6_skip;
|
|
3851
|
+
__pyx_L5_argtuple_error:;
|
|
3852
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("Column", 0, 0, 9, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 282, __pyx_L3_error)</span>
|
|
3853
|
+
__pyx_L6_skip:;
|
|
3854
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
3855
|
+
__pyx_L3_error:;
|
|
3856
|
+
{
|
|
3857
|
+
Py_ssize_t __pyx_temp;
|
|
3858
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
3859
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
3863
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.fields.Column", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3864
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
3865
|
+
return NULL;
|
|
3866
|
+
__pyx_L4_argument_unpacking_done:;
|
|
3867
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_alias), (&PyUnicode_Type), 1, "alias", 1))) <span class='error_goto'>__PYX_ERR(0, 291, __pyx_L1_error)</span>
|
|
3868
|
+
__pyx_r = __pyx_pf_9datamodel_6fields_4Column(__pyx_self, __pyx_v_default, __pyx_v_nullable, __pyx_v_required, __pyx_v_factory, __pyx_v_min, __pyx_v_max, __pyx_v_validator, __pyx_v_kw_only, __pyx_v_alias, __pyx_v_kwargs);
|
|
3869
|
+
</pre><pre class="cython line score-0"> <span class="">292</span>: **kwargs</pre>
|
|
3870
|
+
<pre class="cython line score-0"> <span class="">293</span>: ):</pre>
|
|
3871
|
+
<pre class="cython line score-0"> <span class="">294</span>: """</pre>
|
|
3872
|
+
<pre class="cython line score-0"> <span class="">295</span>: Column.</pre>
|
|
3873
|
+
<pre class="cython line score-0"> <span class="">296</span>: DataModel Function that returns a Field() object</pre>
|
|
3874
|
+
<pre class="cython line score-0"> <span class="">297</span>: """</pre>
|
|
3875
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">298</span>: return Field(</pre>
|
|
3876
|
+
<pre class='cython code score-7 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
3877
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_Field);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)</span>
|
|
3878
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
3879
|
+
/* … */
|
|
3880
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)</span>
|
|
3881
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3882
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
3883
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
3884
|
+
__pyx_r = __pyx_t_3;
|
|
3885
|
+
__pyx_t_3 = 0;
|
|
3886
|
+
goto __pyx_L0;
|
|
3887
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">299</span>: default=default,</pre>
|
|
3888
|
+
<pre class='cython code score-7 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(9);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3889
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
3890
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3891
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">300</span>: nullable=nullable,</pre>
|
|
3892
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_nullable, __pyx_v_nullable) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3893
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">301</span>: required=required,</pre>
|
|
3894
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_required, __pyx_v_required) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3895
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">302</span>: factory=factory,</pre>
|
|
3896
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_factory, __pyx_v_factory) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3897
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">303</span>: min=min,</pre>
|
|
3898
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_min, __pyx_v_min) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3899
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">304</span>: max=max,</pre>
|
|
3900
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_max, __pyx_v_max) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3901
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">305</span>: validator=validator,</pre>
|
|
3902
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_validator, __pyx_v_validator) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3903
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">306</span>: kw_only=kw_only,</pre>
|
|
3904
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_kw_only, __pyx_v_kw_only) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3905
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">307</span>: alias=alias,</pre>
|
|
3906
|
+
<pre class='cython code score-5 '> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_alias, __pyx_v_alias) < 0) <span class='error_goto'>__PYX_ERR(0, 299, __pyx_L1_error)</span>
|
|
3907
|
+
__pyx_t_2 = __pyx_t_3;
|
|
3908
|
+
__pyx_t_3 = 0;
|
|
3909
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">308</span>: **kwargs,</pre>
|
|
3910
|
+
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_MergeKeywords</span>(__pyx_t_2, __pyx_v_kwargs) < 0) <span class='error_goto'>__PYX_ERR(0, 308, __pyx_L1_error)</span>
|
|
3911
|
+
</pre><pre class="cython line score-0"> <span class="">309</span>: )</pre>
|
|
3912
|
+
</div></body></html>
|