Skip to content

Commit 94d13cb

Browse files
authored
refactor: migrate away from deprecated typing classes (#1230)
1 parent e4d7174 commit 94d13cb

File tree

326 files changed

+9940
-8674
lines changed

Some content is hidden

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

326 files changed

+9940
-8674
lines changed

scaleway-async/scaleway_async/account/v3/api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
33

4-
from typing import List, Optional
4+
from typing import Optional
55

66
from scaleway_core.api import API
77
from scaleway_core.bridge import (
@@ -243,14 +243,14 @@ async def list_contract_signatures_all(
243243
page_size: Optional[int] = None,
244244
order_by: Optional[ListContractSignaturesRequestOrderBy] = None,
245245
organization_id: Optional[str] = None,
246-
) -> List[ContractSignature]:
246+
) -> list[ContractSignature]:
247247
"""
248248
List contract signatures for an Organization.
249249
:param page: The page number for the returned contracts.
250250
:param page_size: The maximum number of contracts per page.
251251
:param order_by: How the contracts are ordered in the response.
252252
:param organization_id: Filter on Organization ID.
253-
:return: :class:`List[ContractSignature] <List[ContractSignature]>`
253+
:return: :class:`list[ContractSignature] <list[ContractSignature]>`
254254
255255
Usage:
256256
::
@@ -323,7 +323,7 @@ async def list_projects(
323323
page: Optional[int] = None,
324324
page_size: Optional[int] = None,
325325
order_by: Optional[ListProjectsRequestOrderBy] = None,
326-
project_ids: Optional[List[str]] = None,
326+
project_ids: Optional[list[str]] = None,
327327
) -> ListProjectsResponse:
328328
"""
329329
List all Projects of an Organization.
@@ -367,8 +367,8 @@ async def list_projects_all(
367367
page: Optional[int] = None,
368368
page_size: Optional[int] = None,
369369
order_by: Optional[ListProjectsRequestOrderBy] = None,
370-
project_ids: Optional[List[str]] = None,
371-
) -> List[Project]:
370+
project_ids: Optional[list[str]] = None,
371+
) -> list[Project]:
372372
"""
373373
List all Projects of an Organization.
374374
List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names, and IDs. Other information includes the creation and update date of the Project.
@@ -378,7 +378,7 @@ async def list_projects_all(
378378
:param page_size: Maximum number of Project per page.
379379
:param order_by: Sort order of the returned Projects.
380380
:param project_ids: Project IDs to filter for. The results will be limited to any Projects with an ID in this array.
381-
:return: :class:`List[Project] <List[Project]>`
381+
:return: :class:`list[Project] <list[Project]>`
382382
383383
Usage:
384384
::

scaleway-async/scaleway_async/account/v3/marshalling.py

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
33

4-
from typing import Any, Dict
4+
from typing import Any
55
from dateutil import parser
66

77
from scaleway_core.profile import ProfileDefaults
@@ -43,7 +43,7 @@ def unmarshal_Contract(data: Any) -> Contract:
4343
"Unmarshalling the type 'Contract' failed as data isn't a dictionary."
4444
)
4545

46-
args: Dict[str, Any] = {}
46+
args: dict[str, Any] = {}
4747

4848
field = data.get("id", None)
4949
if field is not None:
@@ -90,7 +90,7 @@ def unmarshal_ContractSignature(data: Any) -> ContractSignature:
9090
"Unmarshalling the type 'ContractSignature' failed as data isn't a dictionary."
9191
)
9292

93-
args: Dict[str, Any] = {}
93+
args: dict[str, Any] = {}
9494

9595
field = data.get("id", None)
9696
if field is not None:
@@ -137,7 +137,7 @@ def unmarshal_QualificationAiMachine(data: Any) -> QualificationAiMachine:
137137
"Unmarshalling the type 'QualificationAiMachine' failed as data isn't a dictionary."
138138
)
139139

140-
args: Dict[str, Any] = {}
140+
args: dict[str, Any] = {}
141141

142142
field = data.get("sub_use_case", None)
143143
if field is not None:
@@ -154,7 +154,7 @@ def unmarshal_QualificationArchiveData(data: Any) -> QualificationArchiveData:
154154
"Unmarshalling the type 'QualificationArchiveData' failed as data isn't a dictionary."
155155
)
156156

157-
args: Dict[str, Any] = {}
157+
args: dict[str, Any] = {}
158158

159159
field = data.get("sub_use_case", None)
160160
if field is not None:
@@ -171,7 +171,7 @@ def unmarshal_QualificationContainer(data: Any) -> QualificationContainer:
171171
"Unmarshalling the type 'QualificationContainer' failed as data isn't a dictionary."
172172
)
173173

174-
args: Dict[str, Any] = {}
174+
args: dict[str, Any] = {}
175175

176176
field = data.get("sub_use_case", None)
177177
if field is not None:
@@ -188,7 +188,7 @@ def unmarshal_QualificationDeploySoftware(data: Any) -> QualificationDeploySoftw
188188
"Unmarshalling the type 'QualificationDeploySoftware' failed as data isn't a dictionary."
189189
)
190190

191-
args: Dict[str, Any] = {}
191+
args: dict[str, Any] = {}
192192

193193
field = data.get("sub_use_case", None)
194194
if field is not None:
@@ -205,7 +205,7 @@ def unmarshal_QualificationHostApplication(data: Any) -> QualificationHostApplic
205205
"Unmarshalling the type 'QualificationHostApplication' failed as data isn't a dictionary."
206206
)
207207

208-
args: Dict[str, Any] = {}
208+
args: dict[str, Any] = {}
209209

210210
field = data.get("sub_use_case", None)
211211
if field is not None:
@@ -222,7 +222,7 @@ def unmarshal_QualificationHostWebsite(data: Any) -> QualificationHostWebsite:
222222
"Unmarshalling the type 'QualificationHostWebsite' failed as data isn't a dictionary."
223223
)
224224

225-
args: Dict[str, Any] = {}
225+
args: dict[str, Any] = {}
226226

227227
field = data.get("sub_use_case", None)
228228
if field is not None:
@@ -239,7 +239,7 @@ def unmarshal_QualificationOtherUseCase(data: Any) -> QualificationOtherUseCase:
239239
"Unmarshalling the type 'QualificationOtherUseCase' failed as data isn't a dictionary."
240240
)
241241

242-
args: Dict[str, Any] = {}
242+
args: dict[str, Any] = {}
243243

244244
field = data.get("sub_use_case", None)
245245
if field is not None:
@@ -258,7 +258,7 @@ def unmarshal_QualificationSetScalewayEnvironment(
258258
"Unmarshalling the type 'QualificationSetScalewayEnvironment' failed as data isn't a dictionary."
259259
)
260260

261-
args: Dict[str, Any] = {}
261+
args: dict[str, Any] = {}
262262

263263
field = data.get("sub_use_case", None)
264264
if field is not None:
@@ -275,7 +275,7 @@ def unmarshal_QualificationShareData(data: Any) -> QualificationShareData:
275275
"Unmarshalling the type 'QualificationShareData' failed as data isn't a dictionary."
276276
)
277277

278-
args: Dict[str, Any] = {}
278+
args: dict[str, Any] = {}
279279

280280
field = data.get("sub_use_case", None)
281281
if field is not None:
@@ -292,7 +292,7 @@ def unmarshal_Qualification(data: Any) -> Qualification:
292292
"Unmarshalling the type 'Qualification' failed as data isn't a dictionary."
293293
)
294294

295-
args: Dict[str, Any] = {}
295+
args: dict[str, Any] = {}
296296

297297
field = data.get("architecture_type", None)
298298
if field is not None:
@@ -367,7 +367,7 @@ def unmarshal_Project(data: Any) -> Project:
367367
"Unmarshalling the type 'Project' failed as data isn't a dictionary."
368368
)
369369

370-
args: Dict[str, Any] = {}
370+
args: dict[str, Any] = {}
371371

372372
field = data.get("id", None)
373373
if field is not None:
@@ -422,7 +422,7 @@ def unmarshal_CheckContractSignatureResponse(
422422
"Unmarshalling the type 'CheckContractSignatureResponse' failed as data isn't a dictionary."
423423
)
424424

425-
args: Dict[str, Any] = {}
425+
args: dict[str, Any] = {}
426426

427427
field = data.get("created", None)
428428
if field is not None:
@@ -447,7 +447,7 @@ def unmarshal_ListContractSignaturesResponse(
447447
"Unmarshalling the type 'ListContractSignaturesResponse' failed as data isn't a dictionary."
448448
)
449449

450-
args: Dict[str, Any] = {}
450+
args: dict[str, Any] = {}
451451

452452
field = data.get("total_count", None)
453453
if field is not None:
@@ -474,7 +474,7 @@ def unmarshal_ListProjectsResponse(data: Any) -> ListProjectsResponse:
474474
"Unmarshalling the type 'ListProjectsResponse' failed as data isn't a dictionary."
475475
)
476476

477-
args: Dict[str, Any] = {}
477+
args: dict[str, Any] = {}
478478

479479
field = data.get("total_count", None)
480480
if field is not None:
@@ -499,7 +499,7 @@ def unmarshal_ProjectQualification(data: Any) -> ProjectQualification:
499499
"Unmarshalling the type 'ProjectQualification' failed as data isn't a dictionary."
500500
)
501501

502-
args: Dict[str, Any] = {}
502+
args: dict[str, Any] = {}
503503

504504
field = data.get("project_id", None)
505505
if field is not None:
@@ -519,8 +519,8 @@ def unmarshal_ProjectQualification(data: Any) -> ProjectQualification:
519519
def marshal_ContractApiCheckContractSignatureRequest(
520520
request: ContractApiCheckContractSignatureRequest,
521521
defaults: ProfileDefaults,
522-
) -> Dict[str, Any]:
523-
output: Dict[str, Any] = {}
522+
) -> dict[str, Any]:
523+
output: dict[str, Any] = {}
524524

525525
if request.contract_name is not None:
526526
output["contract_name"] = request.contract_name
@@ -539,8 +539,8 @@ def marshal_ContractApiCheckContractSignatureRequest(
539539
def marshal_ContractApiCreateContractSignatureRequest(
540540
request: ContractApiCreateContractSignatureRequest,
541541
defaults: ProfileDefaults,
542-
) -> Dict[str, Any]:
543-
output: Dict[str, Any] = {}
542+
) -> dict[str, Any]:
543+
output: dict[str, Any] = {}
544544

545545
if request.contract_name is not None:
546546
output["contract_name"] = request.contract_name
@@ -562,8 +562,8 @@ def marshal_ContractApiCreateContractSignatureRequest(
562562
def marshal_ProjectApiCreateProjectRequest(
563563
request: ProjectApiCreateProjectRequest,
564564
defaults: ProfileDefaults,
565-
) -> Dict[str, Any]:
566-
output: Dict[str, Any] = {}
565+
) -> dict[str, Any]:
566+
output: dict[str, Any] = {}
567567

568568
if request.description is not None:
569569
output["description"] = request.description
@@ -582,8 +582,8 @@ def marshal_ProjectApiCreateProjectRequest(
582582
def marshal_QualificationAiMachine(
583583
request: QualificationAiMachine,
584584
defaults: ProfileDefaults,
585-
) -> Dict[str, Any]:
586-
output: Dict[str, Any] = {}
585+
) -> dict[str, Any]:
586+
output: dict[str, Any] = {}
587587

588588
if request.sub_use_case is not None:
589589
output["sub_use_case"] = request.sub_use_case
@@ -594,8 +594,8 @@ def marshal_QualificationAiMachine(
594594
def marshal_QualificationArchiveData(
595595
request: QualificationArchiveData,
596596
defaults: ProfileDefaults,
597-
) -> Dict[str, Any]:
598-
output: Dict[str, Any] = {}
597+
) -> dict[str, Any]:
598+
output: dict[str, Any] = {}
599599

600600
if request.sub_use_case is not None:
601601
output["sub_use_case"] = request.sub_use_case
@@ -606,8 +606,8 @@ def marshal_QualificationArchiveData(
606606
def marshal_QualificationContainer(
607607
request: QualificationContainer,
608608
defaults: ProfileDefaults,
609-
) -> Dict[str, Any]:
610-
output: Dict[str, Any] = {}
609+
) -> dict[str, Any]:
610+
output: dict[str, Any] = {}
611611

612612
if request.sub_use_case is not None:
613613
output["sub_use_case"] = request.sub_use_case
@@ -618,8 +618,8 @@ def marshal_QualificationContainer(
618618
def marshal_QualificationDeploySoftware(
619619
request: QualificationDeploySoftware,
620620
defaults: ProfileDefaults,
621-
) -> Dict[str, Any]:
622-
output: Dict[str, Any] = {}
621+
) -> dict[str, Any]:
622+
output: dict[str, Any] = {}
623623

624624
if request.sub_use_case is not None:
625625
output["sub_use_case"] = request.sub_use_case
@@ -630,8 +630,8 @@ def marshal_QualificationDeploySoftware(
630630
def marshal_QualificationHostApplication(
631631
request: QualificationHostApplication,
632632
defaults: ProfileDefaults,
633-
) -> Dict[str, Any]:
634-
output: Dict[str, Any] = {}
633+
) -> dict[str, Any]:
634+
output: dict[str, Any] = {}
635635

636636
if request.sub_use_case is not None:
637637
output["sub_use_case"] = request.sub_use_case
@@ -642,8 +642,8 @@ def marshal_QualificationHostApplication(
642642
def marshal_QualificationHostWebsite(
643643
request: QualificationHostWebsite,
644644
defaults: ProfileDefaults,
645-
) -> Dict[str, Any]:
646-
output: Dict[str, Any] = {}
645+
) -> dict[str, Any]:
646+
output: dict[str, Any] = {}
647647

648648
if request.sub_use_case is not None:
649649
output["sub_use_case"] = request.sub_use_case
@@ -654,8 +654,8 @@ def marshal_QualificationHostWebsite(
654654
def marshal_QualificationOtherUseCase(
655655
request: QualificationOtherUseCase,
656656
defaults: ProfileDefaults,
657-
) -> Dict[str, Any]:
658-
output: Dict[str, Any] = {}
657+
) -> dict[str, Any]:
658+
output: dict[str, Any] = {}
659659

660660
if request.sub_use_case is not None:
661661
output["sub_use_case"] = request.sub_use_case
@@ -666,8 +666,8 @@ def marshal_QualificationOtherUseCase(
666666
def marshal_QualificationSetScalewayEnvironment(
667667
request: QualificationSetScalewayEnvironment,
668668
defaults: ProfileDefaults,
669-
) -> Dict[str, Any]:
670-
output: Dict[str, Any] = {}
669+
) -> dict[str, Any]:
670+
output: dict[str, Any] = {}
671671

672672
if request.sub_use_case is not None:
673673
output["sub_use_case"] = request.sub_use_case
@@ -678,8 +678,8 @@ def marshal_QualificationSetScalewayEnvironment(
678678
def marshal_QualificationShareData(
679679
request: QualificationShareData,
680680
defaults: ProfileDefaults,
681-
) -> Dict[str, Any]:
682-
output: Dict[str, Any] = {}
681+
) -> dict[str, Any]:
682+
output: dict[str, Any] = {}
683683

684684
if request.sub_use_case is not None:
685685
output["sub_use_case"] = request.sub_use_case
@@ -690,8 +690,8 @@ def marshal_QualificationShareData(
690690
def marshal_Qualification(
691691
request: Qualification,
692692
defaults: ProfileDefaults,
693-
) -> Dict[str, Any]:
694-
output: Dict[str, Any] = {}
693+
) -> dict[str, Any]:
694+
output: dict[str, Any] = {}
695695
output.update(
696696
resolve_one_of(
697697
[
@@ -753,8 +753,8 @@ def marshal_Qualification(
753753
def marshal_ProjectApiSetProjectQualificationRequest(
754754
request: ProjectApiSetProjectQualificationRequest,
755755
defaults: ProfileDefaults,
756-
) -> Dict[str, Any]:
757-
output: Dict[str, Any] = {}
756+
) -> dict[str, Any]:
757+
output: dict[str, Any] = {}
758758

759759
if request.qualification is not None:
760760
output["qualification"] = marshal_Qualification(request.qualification, defaults)
@@ -765,8 +765,8 @@ def marshal_ProjectApiSetProjectQualificationRequest(
765765
def marshal_ProjectApiUpdateProjectRequest(
766766
request: ProjectApiUpdateProjectRequest,
767767
defaults: ProfileDefaults,
768-
) -> Dict[str, Any]:
769-
output: Dict[str, Any] = {}
768+
) -> dict[str, Any]:
769+
output: dict[str, Any] = {}
770770

771771
if request.name is not None:
772772
output["name"] = request.name

0 commit comments

Comments
 (0)