Skip to content

Commit

Permalink
Update schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Jun 17, 2023
1 parent 93bd786 commit 3068216
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions languages/python/BitwardenClient/schemas.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum
from dataclasses import dataclass
from typing import Any, Optional, List, TypeVar, Type, Callable, cast
from typing import Any, Optional, List, TypeVar, Type, cast, Callable
from uuid import UUID


Expand Down Expand Up @@ -37,16 +37,16 @@ def from_union(fs, x):
assert False


def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
assert isinstance(x, list)
return [f(y) for y in x]


def to_class(c: Type[T], x: Any) -> dict:
assert isinstance(x, c)
return cast(Any, x).to_dict()


def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
assert isinstance(x, list)
return [f(y) for y in x]


def from_bool(x: Any) -> bool:
assert isinstance(x, bool)
return x
Expand Down

0 comments on commit 3068216

Please sign in to comment.