Commit 39b9db2
The `_transform` macro is called at three different places in this file,
but one location was not similarly indented as the other two. This
caused errors in the ruff post_hook like:
```
error: Failed to parse foo/models/foo_request.py:125:9: Expected an indented block after `if` statement
```
The generated code without the indent fix looks like:
```
if not isinstance(self.foo, Unset):
_temp_foo = [] # <-- incorrect indent
for foo_item_data in self.foo:
foo_item: Union[None, int]
foo_item = foo_item_data
_temp_foo.append(foo_item)
foo = (None, json.dumps(_temp_foo).encode(), 'application/json')
```
---------
Co-authored-by: Dylan Anthony <[email protected]>
1 parent 9e6b8c6 commit 39b9db2
File tree
4 files changed
+53
-1
lines changed- end_to_end_tests
- golden-record/my_test_api_client/models
- openapi_python_client/templates/property_templates
4 files changed
+53
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1910 | 1910 | | |
1911 | 1911 | | |
1912 | 1912 | | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1913 | 1921 | | |
1914 | 1922 | | |
1915 | 1923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
1922 | 1929 | | |
1923 | 1930 | | |
1924 | 1931 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
| 158 | + | |
| 159 | + | |
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| |||
201 | 213 | | |
202 | 214 | | |
203 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
204 | 225 | | |
205 | 226 | | |
206 | 227 | | |
| |||
245 | 266 | | |
246 | 267 | | |
247 | 268 | | |
| 269 | + | |
| 270 | + | |
248 | 271 | | |
249 | 272 | | |
250 | 273 | | |
| |||
324 | 347 | | |
325 | 348 | | |
326 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
327 | 363 | | |
328 | 364 | | |
329 | 365 | | |
| |||
371 | 407 | | |
372 | 408 | | |
373 | 409 | | |
| 410 | + | |
374 | 411 | | |
375 | 412 | | |
376 | 413 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments