Skip to content

Commit d2f8f43

Browse files
committed
Set ruff target to py39 and replace deprecated List
1 parent f6f8146 commit d2f8f43

File tree

26 files changed

+193
-202
lines changed

26 files changed

+193
-202
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ xbox-xal = "pythonxbox.scripts.xal:main"
4444

4545
[tool.ruff]
4646
line-length = 88
47-
target-version = "py38"
47+
target-version = "py39"
4848

4949
[tool.ruff.lint]
5050
select = ["E4", "E7", "E9", "F", "UP"]

src/pythonxbox/api/provider/achievements/models.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import datetime, time
2-
from typing import Any, List, Optional
2+
from typing import Any, Optional
33

44
from pydantic import BaseModel
55

@@ -37,20 +37,20 @@ class Title360(CamelCaseModel):
3737
sequence: int
3838
title_id: int
3939
title_type: int
40-
platforms: List[int]
40+
platforms: list[int]
4141
name: str
4242
total_achievements: int
4343
total_gamerscore: int
4444

4545

4646
class Achievement360Response(CamelCaseModel):
47-
achievements: List[Achievement360]
47+
achievements: list[Achievement360]
4848
paging_info: PagingInfo
4949
version: datetime
5050

5151

5252
class Achievement360ProgressResponse(CamelCaseModel):
53-
titles: List[Title360]
53+
titles: list[Title360]
5454
paging_info: PagingInfo
5555
version: datetime
5656

@@ -70,7 +70,7 @@ class Requirement(CamelCaseModel):
7070

7171

7272
class Progression(CamelCaseModel):
73-
requirements: List[Requirement]
73+
requirements: list[Requirement]
7474
time_unlocked: datetime
7575

7676

@@ -93,26 +93,26 @@ class Achievement(CamelCaseModel):
9393
id: str
9494
service_config_id: str
9595
name: str
96-
title_associations: List[TitleAssociation]
96+
title_associations: list[TitleAssociation]
9797
progress_state: str
9898
progression: Progression
99-
media_assets: List[MediaAsset]
100-
platforms: List[str]
99+
media_assets: list[MediaAsset]
100+
platforms: list[str]
101101
is_secret: bool
102102
description: str
103103
locked_description: str
104104
product_id: str
105105
achievement_type: str
106106
participation_type: str
107107
time_window: Any = None
108-
rewards: List[Reward]
108+
rewards: list[Reward]
109109
estimated_time: time
110110
deeplink: Any = None
111111
is_revoked: bool
112112

113113

114114
class AchievementResponse(CamelCaseModel):
115-
achievements: List[Achievement]
115+
achievements: list[Achievement]
116116
paging_info: PagingInfo
117117

118118

@@ -129,5 +129,5 @@ class Title(CamelCaseModel):
129129

130130

131131
class RecentProgressResponse(CamelCaseModel):
132-
titles: List[Title]
132+
titles: list[Title]
133133
paging_info: PagingInfo

src/pythonxbox/api/provider/catalog/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Store Catalog - Lookup Product Information
33
"""
44

5-
from typing import List
6-
75
from pythonxbox.api.provider.baseprovider import BaseProvider
86
from pythonxbox.api.provider.catalog.models import (
97
AlternateIdType,
@@ -20,7 +18,7 @@ class CatalogProvider(BaseProvider):
2018

2119
async def get_products(
2220
self,
23-
big_ids: List[str],
21+
big_ids: list[str],
2422
fields: FieldsTemplate = FieldsTemplate.DETAILS,
2523
**kwargs,
2624
) -> CatalogResponse:

0 commit comments

Comments
 (0)