Skip to content

Commit

Permalink
commit snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Mar 14, 2024
1 parent ccbbb25 commit d5b2941
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Array [
from typing import Any, Dict
class ObjProperty:
def __init__(self, input: Dict):
if hasattr(input, 'number'):
if 'number' in input:
self._number: float = input['number']
if hasattr(input, 'additional_properties'):
if 'additional_properties' in input:
self._additional_properties: dict[str, Any] = input['additional_properties']
@property
Expand All @@ -34,9 +34,9 @@ Array [
from typing import Any, Dict
class ObjProperty:
def __init__(self, input: Dict):
if hasattr(input, 'number'):
if 'number' in input:
self._number: float = input['number']
if hasattr(input, 'additional_properties'):
if 'additional_properties' in input:
self._additional_properties: dict[str, Any] = input['additional_properties']
@property
Expand All @@ -62,9 +62,9 @@ Array [
from typing import Any, Dict
class Root:
def __init__(self, input: Dict):
if hasattr(input, 'email'):
if 'email' in input:
self._email: str = input['email']
if hasattr(input, 'obj_property'):
if 'obj_property' in input:
self._obj_property: ObjProperty = ObjProperty(input['obj_property'])
@property
Expand All @@ -90,9 +90,9 @@ Array [
from typing import Any, Dict
class Root:
def __init__(self, input: Dict):
if hasattr(input, 'email'):
if 'email' in input:
self._email: str = input['email']
if hasattr(input, 'obj_property'):
if 'obj_property' in input:
self._obj_property: ObjProperty = ObjProperty(input['obj_property'])
@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Should be able to render python models and should log expected output t
Array [
"class Root:
def __init__(self, input: Dict):
if hasattr(input, 'email'):
if 'email' in input:
self._email: str = input['email']
@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ exports[`Should be able to render JSON serialization and deserialization functio
Array [
"class Root:
def __init__(self, input: Dict):
if hasattr(input, 'email'):
if 'email' in input:
self._email: str = input['email']
if hasattr(input, 'additional_properties'):
if 'additional_properties' in input:
self._additional_properties: dict[str, Any] = input['additional_properties']
@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exports[`PythonGenerator Class should handle self reference models 1`] = `
exports[`PythonGenerator Class should not render reserved keyword 1`] = `
"class Address:
def __init__(self, input: Dict):
if hasattr(input, 'reserved_del'):
if 'reserved_del' in input:
self._reserved_del: str = input['reserved_del']
@property
Expand All @@ -73,12 +73,12 @@ exports[`PythonGenerator Class should render \`class\` type 1`] = `
self._city: str = input['city']
self._state: str = input['state']
self._house_number: float = input['house_number']
if hasattr(input, 'marriage'):
if 'marriage' in input:
self._marriage: bool = input['marriage']
if hasattr(input, 'members'):
if 'members' in input:
self._members: str | float | bool = input['members']
self._array_type: List[str | float | Any] = input['array_type']
if hasattr(input, 'additional_properties'):
if 'additional_properties' in input:
self._additional_properties: dict[str, Any | str] = input['additional_properties']
@property
Expand Down Expand Up @@ -158,9 +158,9 @@ exports[`PythonGenerator Class should work with custom preset for \`class\` type
def __init__(self, input: Dict):
if hasattr(input, 'property'):
if 'property' in input:
self._property: str = input['property']
if hasattr(input, 'additional_properties'):
if 'additional_properties' in input:
self._additional_properties: dict[str, Any] = input['additional_properties']
test2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
exports[`PYTHON_JSON_SERIALIZER_PRESET should render serializer and deserializer for class 1`] = `
"class Test:
def __init__(self, input: Dict):
if hasattr(input, 'prop'):
if 'prop' in input:
self._prop: str = input['prop']
if hasattr(input, 'additional_properties'):
if 'additional_properties' in input:
self._additional_properties: dict[str, Any] = input['additional_properties']
@property
Expand Down

0 comments on commit d5b2941

Please sign in to comment.