Skip to content

Commit 3f37c03

Browse files
committed
fix(api-fields): format and lint + add py3.13 for linting
1 parent 45afa6f commit 3f37c03

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup Python
5555
uses: actions/setup-python@v4
5656
with:
57-
python-version: '3.12'
57+
python-version: '3.13'
5858
- name: Install Python dependencies
5959
run: |
6060
python -m pip install --upgrade hatch

src/vaultwarden/models/bitwarden.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ def set_users(
160160
users_payload = []
161161
if users is not None and len(users) > 0:
162162
if isinstance(users[0], CollectionUser):
163-
users = cast(list[CollectionUser], users)
163+
users = cast("list[CollectionUser]", users)
164164
users_payload = [
165165
user.model_dump(
166166
exclude={"CollectionId"}, by_alias=True, mode="json"
167167
)
168168
for user in users
169169
]
170170
else:
171-
users = cast(list[UUID], users)
171+
users = cast("list[UUID]", users)
172172
users_payload = [
173173
{
174174
"id": str(user_id),
@@ -365,7 +365,7 @@ def invite(
365365
if collections is not None and len(collections) > 0:
366366
for coll in collections:
367367
if isinstance(coll, UserCollection):
368-
coll = cast(UserCollection, coll)
368+
coll = cast("UserCollection", coll)
369369
ex: dict[str, Literal[True]] = {"UserId": True}
370370
collections_payload.append(
371371
coll.model_dump(
@@ -376,13 +376,13 @@ def invite(
376376
)
377377
else:
378378
if isinstance(coll, OrganizationCollection):
379-
coll = cast(OrganizationCollection, coll)
379+
coll = cast("OrganizationCollection", coll)
380380
coll_id = str(coll.Id)
381381
elif isinstance(coll, UUID):
382-
coll = cast(UUID, coll)
382+
coll = cast("UUID", coll)
383383
coll_id = str(coll)
384384
else:
385-
coll_id = cast(str, coll)
385+
coll_id = cast("str", coll)
386386
collections_payload.append(
387387
{
388388
"id": coll_id,

0 commit comments

Comments
 (0)