Skip to content

Commit 59c4381

Browse files
authored
[create-pull-request] automated change (#135)
Co-authored-by: yejiyang <[email protected]>
1 parent 77bd19c commit 59c4381

File tree

59 files changed

+8891
-7997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+8891
-7997
lines changed

field-manager-python-client/field_manager_python_client/api/files/parse_project_file_projects_project_id_files_file_id_parse_post.py

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from ... import errors
88
from ...client import AuthenticatedClient, Client
99
from ...models.http_validation_error import HTTPValidationError
10-
from ...models.location import Location
1110
from ...types import UNSET, Response, Unset
1211

1312

@@ -42,17 +41,7 @@ def _get_kwargs(
4241

4342
def _parse_response(
4443
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
45-
) -> Optional[Union[HTTPValidationError, list["Location"]]]:
46-
if response.status_code == 201:
47-
response_201 = []
48-
_response_201 = response.json()
49-
for response_201_item_data in _response_201:
50-
response_201_item = Location.from_dict(response_201_item_data)
51-
52-
response_201.append(response_201_item)
53-
54-
return response_201
55-
44+
) -> Optional[HTTPValidationError]:
5645
if response.status_code == 422:
5746
response_422 = HTTPValidationError.from_dict(response.json())
5847

@@ -66,7 +55,7 @@ def _parse_response(
6655

6756
def _build_response(
6857
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
69-
) -> Response[Union[HTTPValidationError, list["Location"]]]:
58+
) -> Response[HTTPValidationError]:
7059
return Response(
7160
status_code=HTTPStatus(response.status_code),
7261
content=response.content,
@@ -82,7 +71,7 @@ def sync_detailed(
8271
client: AuthenticatedClient,
8372
srid: Union[None, Unset, int] = UNSET,
8473
swap_x_y: Union[Unset, bool] = False,
85-
) -> Response[Union[HTTPValidationError, list["Location"]]]:
74+
) -> Response[HTTPValidationError]:
8675
"""Parse Project File
8776
8877
Parse an already queued location file.
@@ -98,7 +87,7 @@ def sync_detailed(
9887
httpx.TimeoutException: If the request takes longer than Client.timeout.
9988
10089
Returns:
101-
Response[Union[HTTPValidationError, list['Location']]]
90+
Response[HTTPValidationError]
10291
"""
10392

10493
kwargs = _get_kwargs(
@@ -122,7 +111,7 @@ def sync(
122111
client: AuthenticatedClient,
123112
srid: Union[None, Unset, int] = UNSET,
124113
swap_x_y: Union[Unset, bool] = False,
125-
) -> Optional[Union[HTTPValidationError, list["Location"]]]:
114+
) -> Optional[HTTPValidationError]:
126115
"""Parse Project File
127116
128117
Parse an already queued location file.
@@ -138,7 +127,7 @@ def sync(
138127
httpx.TimeoutException: If the request takes longer than Client.timeout.
139128
140129
Returns:
141-
Union[HTTPValidationError, list['Location']]
130+
HTTPValidationError
142131
"""
143132

144133
return sync_detailed(
@@ -157,7 +146,7 @@ async def asyncio_detailed(
157146
client: AuthenticatedClient,
158147
srid: Union[None, Unset, int] = UNSET,
159148
swap_x_y: Union[Unset, bool] = False,
160-
) -> Response[Union[HTTPValidationError, list["Location"]]]:
149+
) -> Response[HTTPValidationError]:
161150
"""Parse Project File
162151
163152
Parse an already queued location file.
@@ -173,7 +162,7 @@ async def asyncio_detailed(
173162
httpx.TimeoutException: If the request takes longer than Client.timeout.
174163
175164
Returns:
176-
Response[Union[HTTPValidationError, list['Location']]]
165+
Response[HTTPValidationError]
177166
"""
178167

179168
kwargs = _get_kwargs(
@@ -195,7 +184,7 @@ async def asyncio(
195184
client: AuthenticatedClient,
196185
srid: Union[None, Unset, int] = UNSET,
197186
swap_x_y: Union[Unset, bool] = False,
198-
) -> Optional[Union[HTTPValidationError, list["Location"]]]:
187+
) -> Optional[HTTPValidationError]:
199188
"""Parse Project File
200189
201190
Parse an already queued location file.
@@ -211,7 +200,7 @@ async def asyncio(
211200
httpx.TimeoutException: If the request takes longer than Client.timeout.
212201
213202
Returns:
214-
Union[HTTPValidationError, list['Location']]
203+
HTTPValidationError
215204
"""
216205

217206
return (

field-manager-python-client/field_manager_python_client/api/locations/add_location_to_project_projects_project_id_locations_post.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from ... import errors
77
from ...client import AuthenticatedClient, Client
88
from ...models.http_validation_error import HTTPValidationError
9-
from ...models.location import Location
109
from ...models.location_create import LocationCreate
1110
from ...types import Response
1211

@@ -33,12 +32,7 @@ def _get_kwargs(
3332

3433
def _parse_response(
3534
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
36-
) -> Optional[Union[HTTPValidationError, Location]]:
37-
if response.status_code == 201:
38-
response_201 = Location.from_dict(response.json())
39-
40-
return response_201
41-
35+
) -> Optional[HTTPValidationError]:
4236
if response.status_code == 422:
4337
response_422 = HTTPValidationError.from_dict(response.json())
4438

@@ -52,7 +46,7 @@ def _parse_response(
5246

5347
def _build_response(
5448
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
55-
) -> Response[Union[HTTPValidationError, Location]]:
49+
) -> Response[HTTPValidationError]:
5650
return Response(
5751
status_code=HTTPStatus(response.status_code),
5852
content=response.content,
@@ -66,7 +60,7 @@ def sync_detailed(
6660
*,
6761
client: AuthenticatedClient,
6862
body: LocationCreate,
69-
) -> Response[Union[HTTPValidationError, Location]]:
63+
) -> Response[HTTPValidationError]:
7064
"""Add Location To Project
7165
7266
Add location to project.
@@ -82,7 +76,7 @@ def sync_detailed(
8276
httpx.TimeoutException: If the request takes longer than Client.timeout.
8377
8478
Returns:
85-
Response[Union[HTTPValidationError, Location]]
79+
Response[HTTPValidationError]
8680
"""
8781

8882
kwargs = _get_kwargs(
@@ -102,7 +96,7 @@ def sync(
10296
*,
10397
client: AuthenticatedClient,
10498
body: LocationCreate,
105-
) -> Optional[Union[HTTPValidationError, Location]]:
99+
) -> Optional[HTTPValidationError]:
106100
"""Add Location To Project
107101
108102
Add location to project.
@@ -118,7 +112,7 @@ def sync(
118112
httpx.TimeoutException: If the request takes longer than Client.timeout.
119113
120114
Returns:
121-
Union[HTTPValidationError, Location]
115+
HTTPValidationError
122116
"""
123117

124118
return sync_detailed(
@@ -133,7 +127,7 @@ async def asyncio_detailed(
133127
*,
134128
client: AuthenticatedClient,
135129
body: LocationCreate,
136-
) -> Response[Union[HTTPValidationError, Location]]:
130+
) -> Response[HTTPValidationError]:
137131
"""Add Location To Project
138132
139133
Add location to project.
@@ -149,7 +143,7 @@ async def asyncio_detailed(
149143
httpx.TimeoutException: If the request takes longer than Client.timeout.
150144
151145
Returns:
152-
Response[Union[HTTPValidationError, Location]]
146+
Response[HTTPValidationError]
153147
"""
154148

155149
kwargs = _get_kwargs(
@@ -167,7 +161,7 @@ async def asyncio(
167161
*,
168162
client: AuthenticatedClient,
169163
body: LocationCreate,
170-
) -> Optional[Union[HTTPValidationError, Location]]:
164+
) -> Optional[HTTPValidationError]:
171165
"""Add Location To Project
172166
173167
Add location to project.
@@ -183,7 +177,7 @@ async def asyncio(
183177
httpx.TimeoutException: If the request takes longer than Client.timeout.
184178
185179
Returns:
186-
Union[HTTPValidationError, Location]
180+
HTTPValidationError
187181
"""
188182

189183
return (

field-manager-python-client/field_manager_python_client/api/locations/get_location_in_project_by_name_projects_project_id_locations_get_by_name_name_get.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from ... import errors
77
from ...client import AuthenticatedClient, Client
88
from ...models.http_validation_error import HTTPValidationError
9-
from ...models.location import Location
109
from ...types import Response
1110

1211

@@ -24,12 +23,7 @@ def _get_kwargs(
2423

2524
def _parse_response(
2625
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
27-
) -> Optional[Union[HTTPValidationError, Location]]:
28-
if response.status_code == 200:
29-
response_200 = Location.from_dict(response.json())
30-
31-
return response_200
32-
26+
) -> Optional[HTTPValidationError]:
3327
if response.status_code == 422:
3428
response_422 = HTTPValidationError.from_dict(response.json())
3529

@@ -43,7 +37,7 @@ def _parse_response(
4337

4438
def _build_response(
4539
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
46-
) -> Response[Union[HTTPValidationError, Location]]:
40+
) -> Response[HTTPValidationError]:
4741
return Response(
4842
status_code=HTTPStatus(response.status_code),
4943
content=response.content,
@@ -57,7 +51,7 @@ def sync_detailed(
5751
name: str,
5852
*,
5953
client: AuthenticatedClient,
60-
) -> Response[Union[HTTPValidationError, Location]]:
54+
) -> Response[HTTPValidationError]:
6155
"""Get Location In Project By Name
6256
6357
Return a specific location
@@ -71,7 +65,7 @@ def sync_detailed(
7165
httpx.TimeoutException: If the request takes longer than Client.timeout.
7266
7367
Returns:
74-
Response[Union[HTTPValidationError, Location]]
68+
Response[HTTPValidationError]
7569
"""
7670

7771
kwargs = _get_kwargs(
@@ -91,7 +85,7 @@ def sync(
9185
name: str,
9286
*,
9387
client: AuthenticatedClient,
94-
) -> Optional[Union[HTTPValidationError, Location]]:
88+
) -> Optional[HTTPValidationError]:
9589
"""Get Location In Project By Name
9690
9791
Return a specific location
@@ -105,7 +99,7 @@ def sync(
10599
httpx.TimeoutException: If the request takes longer than Client.timeout.
106100
107101
Returns:
108-
Union[HTTPValidationError, Location]
102+
HTTPValidationError
109103
"""
110104

111105
return sync_detailed(
@@ -120,7 +114,7 @@ async def asyncio_detailed(
120114
name: str,
121115
*,
122116
client: AuthenticatedClient,
123-
) -> Response[Union[HTTPValidationError, Location]]:
117+
) -> Response[HTTPValidationError]:
124118
"""Get Location In Project By Name
125119
126120
Return a specific location
@@ -134,7 +128,7 @@ async def asyncio_detailed(
134128
httpx.TimeoutException: If the request takes longer than Client.timeout.
135129
136130
Returns:
137-
Response[Union[HTTPValidationError, Location]]
131+
Response[HTTPValidationError]
138132
"""
139133

140134
kwargs = _get_kwargs(
@@ -152,7 +146,7 @@ async def asyncio(
152146
name: str,
153147
*,
154148
client: AuthenticatedClient,
155-
) -> Optional[Union[HTTPValidationError, Location]]:
149+
) -> Optional[HTTPValidationError]:
156150
"""Get Location In Project By Name
157151
158152
Return a specific location
@@ -166,7 +160,7 @@ async def asyncio(
166160
httpx.TimeoutException: If the request takes longer than Client.timeout.
167161
168162
Returns:
169-
Union[HTTPValidationError, Location]
163+
HTTPValidationError
170164
"""
171165

172166
return (

0 commit comments

Comments
 (0)