Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,14 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

@property
def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("bar", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down Expand Up @@ -125,10 +122,7 @@ def from_dict_(

@property
def baz(self) -> None:
return typing.cast(
None,
self.__getitem__("baz")
)
return self.__getitem__("baz")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ def bar(self) -> typing.Union[str, schemas.Unset]:
val = self.get("bar", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
str,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def foo(self) -> typing.Union[str, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
str,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,14 @@ def from_dict_(

@property
def foo(self) -> schemas.OUTPUT_BASE_TYPES:
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
self.__getitem__("foo")
)
return self.__getitem__("foo")

@property
def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("bar", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ def alpha(self) -> typing.Union[int, float, schemas.Unset]:
val = self.get("alpha", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
typing.Union[int, float],
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def someProp(self) -> typing.Union[str, schemas.Unset]:
val = self.get("someProp", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
str,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def someProp(self) -> typing.Union[str, schemas.Unset]:
val = self.get("someProp", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
str,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,14 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

@property
def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("bar", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down Expand Up @@ -125,10 +122,7 @@ def from_dict_(

@property
def baz(self) -> None:
return typing.cast(
None,
self.__getitem__("baz")
)
return self.__getitem__("baz")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("bar", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val
FooDictInput = typing.TypedDict(
'FooDictInput',
{
Expand Down Expand Up @@ -169,10 +166,7 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def foo(self) -> typing.Union[str, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
str,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def from_dict_(

@property
def foo(self) -> str:
return typing.cast(
str,
self.__getitem__("foo")
)
return self.__getitem__("foo")

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def length(self) -> typing.Union[str, schemas.Unset]:
val = self.get("length", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
str,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down Expand Up @@ -160,10 +157,7 @@ def __proto__(self) -> typing.Union[int, float, schemas.Unset]:
val = self.get("__proto__", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
typing.Union[int, float],
val
)
return val

@property
def toString(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
Expand All @@ -180,10 +174,7 @@ def constructor(self) -> typing.Union[int, float, schemas.Unset]:
val = self.get("constructor", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
typing.Union[int, float],
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def foo(self) -> typing.Union[None, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
None,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
val = self.get("foo", schemas.unset)
if isinstance(val, schemas.Unset):
return val
return typing.cast(
schemas.OUTPUT_BASE_TYPES,
val
)
return val

def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]:
schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__)
Expand Down
Loading