Skip to content

Commit c1811fb

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

File tree

370 files changed

+19895
-18396
lines changed

Some content is hidden

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

370 files changed

+19895
-18396
lines changed

field-manager-python-client/field_manager_python_client/api/comments/delete_comment_projects_project_id_locations_location_id_comments_comment_id_delete.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Optional, Union
2+
from typing import Any
33
from uuid import UUID
44

55
import httpx
@@ -16,11 +16,11 @@ def _get_kwargs(
1616
location_id: UUID,
1717
comment_id: UUID,
1818
*,
19-
method_id: Union[None, UUID, Unset] = UNSET,
19+
method_id: None | Unset | UUID = UNSET,
2020
) -> dict[str, Any]:
2121
params: dict[str, Any] = {}
2222

23-
json_method_id: Union[None, Unset, str]
23+
json_method_id: None | str | Unset
2424
if isinstance(method_id, Unset):
2525
json_method_id = UNSET
2626
elif isinstance(method_id, UUID):
@@ -41,8 +41,8 @@ def _get_kwargs(
4141

4242

4343
def _parse_response(
44-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
45-
) -> Optional[Union[Comment, HTTPValidationError]]:
44+
*, client: AuthenticatedClient | Client, response: httpx.Response
45+
) -> Comment | HTTPValidationError | None:
4646
if response.status_code == 200:
4747
response_200 = Comment.from_dict(response.json())
4848

@@ -60,8 +60,8 @@ def _parse_response(
6060

6161

6262
def _build_response(
63-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
64-
) -> Response[Union[Comment, HTTPValidationError]]:
63+
*, client: AuthenticatedClient | Client, response: httpx.Response
64+
) -> Response[Comment | HTTPValidationError]:
6565
return Response(
6666
status_code=HTTPStatus(response.status_code),
6767
content=response.content,
@@ -76,8 +76,8 @@ def sync_detailed(
7676
comment_id: UUID,
7777
*,
7878
client: AuthenticatedClient,
79-
method_id: Union[None, UUID, Unset] = UNSET,
80-
) -> Response[Union[Comment, HTTPValidationError]]:
79+
method_id: None | Unset | UUID = UNSET,
80+
) -> Response[Comment | HTTPValidationError]:
8181
"""Delete Comment
8282
8383
Soft delete comment by setting is_deleted true
@@ -87,14 +87,14 @@ def sync_detailed(
8787
project_id (str):
8888
location_id (UUID):
8989
comment_id (UUID):
90-
method_id (Union[None, UUID, Unset]):
90+
method_id (None | Unset | UUID):
9191
9292
Raises:
9393
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
9494
httpx.TimeoutException: If the request takes longer than Client.timeout.
9595
9696
Returns:
97-
Response[Union[Comment, HTTPValidationError]]
97+
Response[Comment | HTTPValidationError]
9898
"""
9999

100100
kwargs = _get_kwargs(
@@ -117,8 +117,8 @@ def sync(
117117
comment_id: UUID,
118118
*,
119119
client: AuthenticatedClient,
120-
method_id: Union[None, UUID, Unset] = UNSET,
121-
) -> Optional[Union[Comment, HTTPValidationError]]:
120+
method_id: None | Unset | UUID = UNSET,
121+
) -> Comment | HTTPValidationError | None:
122122
"""Delete Comment
123123
124124
Soft delete comment by setting is_deleted true
@@ -128,14 +128,14 @@ def sync(
128128
project_id (str):
129129
location_id (UUID):
130130
comment_id (UUID):
131-
method_id (Union[None, UUID, Unset]):
131+
method_id (None | Unset | UUID):
132132
133133
Raises:
134134
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
135135
httpx.TimeoutException: If the request takes longer than Client.timeout.
136136
137137
Returns:
138-
Union[Comment, HTTPValidationError]
138+
Comment | HTTPValidationError
139139
"""
140140

141141
return sync_detailed(
@@ -153,8 +153,8 @@ async def asyncio_detailed(
153153
comment_id: UUID,
154154
*,
155155
client: AuthenticatedClient,
156-
method_id: Union[None, UUID, Unset] = UNSET,
157-
) -> Response[Union[Comment, HTTPValidationError]]:
156+
method_id: None | Unset | UUID = UNSET,
157+
) -> Response[Comment | HTTPValidationError]:
158158
"""Delete Comment
159159
160160
Soft delete comment by setting is_deleted true
@@ -164,14 +164,14 @@ async def asyncio_detailed(
164164
project_id (str):
165165
location_id (UUID):
166166
comment_id (UUID):
167-
method_id (Union[None, UUID, Unset]):
167+
method_id (None | Unset | UUID):
168168
169169
Raises:
170170
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
171171
httpx.TimeoutException: If the request takes longer than Client.timeout.
172172
173173
Returns:
174-
Response[Union[Comment, HTTPValidationError]]
174+
Response[Comment | HTTPValidationError]
175175
"""
176176

177177
kwargs = _get_kwargs(
@@ -192,8 +192,8 @@ async def asyncio(
192192
comment_id: UUID,
193193
*,
194194
client: AuthenticatedClient,
195-
method_id: Union[None, UUID, Unset] = UNSET,
196-
) -> Optional[Union[Comment, HTTPValidationError]]:
195+
method_id: None | Unset | UUID = UNSET,
196+
) -> Comment | HTTPValidationError | None:
197197
"""Delete Comment
198198
199199
Soft delete comment by setting is_deleted true
@@ -203,14 +203,14 @@ async def asyncio(
203203
project_id (str):
204204
location_id (UUID):
205205
comment_id (UUID):
206-
method_id (Union[None, UUID, Unset]):
206+
method_id (None | Unset | UUID):
207207
208208
Raises:
209209
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
210210
httpx.TimeoutException: If the request takes longer than Client.timeout.
211211
212212
Returns:
213-
Union[Comment, HTTPValidationError]
213+
Comment | HTTPValidationError
214214
"""
215215

216216
return (

field-manager-python-client/field_manager_python_client/api/comments/get_likes_projects_project_id_locations_location_id_comments_comment_id_likes_get.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Optional, Union
2+
from typing import Any
33
from uuid import UUID
44

55
import httpx
@@ -16,11 +16,11 @@ def _get_kwargs(
1616
location_id: UUID,
1717
comment_id: UUID,
1818
*,
19-
method_id: Union[None, UUID, Unset] = UNSET,
19+
method_id: None | Unset | UUID = UNSET,
2020
) -> dict[str, Any]:
2121
params: dict[str, Any] = {}
2222

23-
json_method_id: Union[None, Unset, str]
23+
json_method_id: None | str | Unset
2424
if isinstance(method_id, Unset):
2525
json_method_id = UNSET
2626
elif isinstance(method_id, UUID):
@@ -41,8 +41,8 @@ def _get_kwargs(
4141

4242

4343
def _parse_response(
44-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
45-
) -> Optional[Union[HTTPValidationError, list["Like"]]]:
44+
*, client: AuthenticatedClient | Client, response: httpx.Response
45+
) -> HTTPValidationError | list[Like] | None:
4646
if response.status_code == 200:
4747
response_200 = []
4848
_response_200 = response.json()
@@ -65,8 +65,8 @@ def _parse_response(
6565

6666

6767
def _build_response(
68-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
69-
) -> Response[Union[HTTPValidationError, list["Like"]]]:
68+
*, client: AuthenticatedClient | Client, response: httpx.Response
69+
) -> Response[HTTPValidationError | list[Like]]:
7070
return Response(
7171
status_code=HTTPStatus(response.status_code),
7272
content=response.content,
@@ -81,8 +81,8 @@ def sync_detailed(
8181
comment_id: UUID,
8282
*,
8383
client: AuthenticatedClient,
84-
method_id: Union[None, UUID, Unset] = UNSET,
85-
) -> Response[Union[HTTPValidationError, list["Like"]]]:
84+
method_id: None | Unset | UUID = UNSET,
85+
) -> Response[HTTPValidationError | list[Like]]:
8686
"""Get Likes
8787
8888
Get likes on a comment
@@ -91,14 +91,14 @@ def sync_detailed(
9191
project_id (str):
9292
location_id (UUID):
9393
comment_id (UUID):
94-
method_id (Union[None, UUID, Unset]):
94+
method_id (None | Unset | UUID):
9595
9696
Raises:
9797
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
9898
httpx.TimeoutException: If the request takes longer than Client.timeout.
9999
100100
Returns:
101-
Response[Union[HTTPValidationError, list['Like']]]
101+
Response[HTTPValidationError | list[Like]]
102102
"""
103103

104104
kwargs = _get_kwargs(
@@ -121,8 +121,8 @@ def sync(
121121
comment_id: UUID,
122122
*,
123123
client: AuthenticatedClient,
124-
method_id: Union[None, UUID, Unset] = UNSET,
125-
) -> Optional[Union[HTTPValidationError, list["Like"]]]:
124+
method_id: None | Unset | UUID = UNSET,
125+
) -> HTTPValidationError | list[Like] | None:
126126
"""Get Likes
127127
128128
Get likes on a comment
@@ -131,14 +131,14 @@ def sync(
131131
project_id (str):
132132
location_id (UUID):
133133
comment_id (UUID):
134-
method_id (Union[None, UUID, Unset]):
134+
method_id (None | Unset | UUID):
135135
136136
Raises:
137137
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
138138
httpx.TimeoutException: If the request takes longer than Client.timeout.
139139
140140
Returns:
141-
Union[HTTPValidationError, list['Like']]
141+
HTTPValidationError | list[Like]
142142
"""
143143

144144
return sync_detailed(
@@ -156,8 +156,8 @@ async def asyncio_detailed(
156156
comment_id: UUID,
157157
*,
158158
client: AuthenticatedClient,
159-
method_id: Union[None, UUID, Unset] = UNSET,
160-
) -> Response[Union[HTTPValidationError, list["Like"]]]:
159+
method_id: None | Unset | UUID = UNSET,
160+
) -> Response[HTTPValidationError | list[Like]]:
161161
"""Get Likes
162162
163163
Get likes on a comment
@@ -166,14 +166,14 @@ async def asyncio_detailed(
166166
project_id (str):
167167
location_id (UUID):
168168
comment_id (UUID):
169-
method_id (Union[None, UUID, Unset]):
169+
method_id (None | Unset | UUID):
170170
171171
Raises:
172172
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
173173
httpx.TimeoutException: If the request takes longer than Client.timeout.
174174
175175
Returns:
176-
Response[Union[HTTPValidationError, list['Like']]]
176+
Response[HTTPValidationError | list[Like]]
177177
"""
178178

179179
kwargs = _get_kwargs(
@@ -194,8 +194,8 @@ async def asyncio(
194194
comment_id: UUID,
195195
*,
196196
client: AuthenticatedClient,
197-
method_id: Union[None, UUID, Unset] = UNSET,
198-
) -> Optional[Union[HTTPValidationError, list["Like"]]]:
197+
method_id: None | Unset | UUID = UNSET,
198+
) -> HTTPValidationError | list[Like] | None:
199199
"""Get Likes
200200
201201
Get likes on a comment
@@ -204,14 +204,14 @@ async def asyncio(
204204
project_id (str):
205205
location_id (UUID):
206206
comment_id (UUID):
207-
method_id (Union[None, UUID, Unset]):
207+
method_id (None | Unset | UUID):
208208
209209
Raises:
210210
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
211211
httpx.TimeoutException: If the request takes longer than Client.timeout.
212212
213213
Returns:
214-
Union[HTTPValidationError, list['Like']]
214+
HTTPValidationError | list[Like]
215215
"""
216216

217217
return (

0 commit comments

Comments
 (0)