Skip to content

Commit 03dd7e7

Browse files
committed
linting - fix casts
1 parent f95c365 commit 03dd7e7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/vaultwarden/models/bitwarden.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def api_client(self) -> BitwardenAPIClient:
6767
def decode_bytes(
6868
value: Any, handler: ValidatorFunctionWrapHandler, info: ValidationInfo
6969
) -> bytes:
70-
context: dict = cast(dict, info.context)
71-
keys: list[bytes] = cast(list[bytes], context.get("cctx"))
70+
context: dict = cast("dict", info.context)
71+
keys: list[bytes] = cast("list[bytes]", context.get("cctx"))
7272
for key in keys[::-1]:
7373
try:
7474
return decrypt(handler(value), key)
@@ -227,8 +227,8 @@ def set_key(
227227
info: ValidationInfo,
228228
) -> Self:
229229
if (key := data.get("key")) is not None:
230-
context = cast(dict, info.context)
231-
cctx = cast(list[bytes], context.get("cctx"))
230+
context = cast("dict", info.context)
231+
cctx = cast("list[bytes]", context.get("cctx"))
232232

233233
cctx.append(decrypt(key, cctx[0]))
234234

0 commit comments

Comments
 (0)