fix ups and autopep8
Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
2
Makefile
2
Makefile
@ -15,7 +15,7 @@ generate: docker-image ## Generate the api client.
|
|||||||
--name python-generator \
|
--name python-generator \
|
||||||
-v $(CURDIR):/usr/src \
|
-v $(CURDIR):/usr/src \
|
||||||
--workdir /usr/src \
|
--workdir /usr/src \
|
||||||
$(DOCKER_IMAGE_NAME) poetry run python generate/generate.py && poetry run autopep8 --in-place --aggressive --aggressive kittycad/models/*.py && autopep8 --in-place --aggressive --aggressive kittycad/api/*.py
|
$(DOCKER_IMAGE_NAME) sh -c 'poetry run python generate/generate.py && poetry run autopep8 --in-place --aggressive --aggressive kittycad/models/*.py && poetry run autopep8 --in-place --aggressive --aggressive kittycad/api/*.py'
|
||||||
|
|
||||||
.PHONY: shell
|
.PHONY: shell
|
||||||
shell: docker-image ## Pop into a shell in the docker image.
|
shell: docker-image ## Pop into a shell in the docker image.
|
||||||
|
@ -8,6 +8,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="AuthSession")
|
T = TypeVar("T", bound="AuthSession")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AuthSession:
|
class AuthSession:
|
||||||
""" """
|
""" """
|
||||||
@ -80,19 +81,20 @@ class AuthSession:
|
|||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
|
||||||
auth_session = cls(
|
auth_session = cls(
|
||||||
created_at= created_at,
|
created_at=created_at,
|
||||||
email= email,
|
email=email,
|
||||||
id= id,
|
id=id,
|
||||||
image= image,
|
image=image,
|
||||||
ip_address= ip_address,
|
ip_address=ip_address,
|
||||||
is_valid= is_valid,
|
is_valid=is_valid,
|
||||||
token= token,
|
token=token,
|
||||||
user_id= user_id,
|
user_id=user_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
auth_session.additional_properties = d
|
auth_session.additional_properties = d
|
||||||
|
|
||||||
|
|
||||||
return auth_session
|
return auth_session
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="ErrorMessage")
|
T = TypeVar("T", bound="ErrorMessage")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ErrorMessage:
|
class ErrorMessage:
|
||||||
""" """
|
""" """
|
||||||
@ -41,14 +42,15 @@ class ErrorMessage:
|
|||||||
|
|
||||||
status = d.pop("status", UNSET)
|
status = d.pop("status", UNSET)
|
||||||
|
|
||||||
|
|
||||||
error_message = cls(
|
error_message = cls(
|
||||||
code= code,
|
code=code,
|
||||||
message= message,
|
message=message,
|
||||||
status= status,
|
status=status,
|
||||||
)
|
)
|
||||||
|
|
||||||
error_message.additional_properties = d
|
error_message.additional_properties = d
|
||||||
|
|
||||||
|
|
||||||
return error_message
|
return error_message
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -11,6 +11,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="FileConversion")
|
T = TypeVar("T", bound="FileConversion")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class FileConversion:
|
class FileConversion:
|
||||||
""" """
|
""" """
|
||||||
@ -118,19 +119,20 @@ class FileConversion:
|
|||||||
else:
|
else:
|
||||||
status = FileConversionStatus(_status)
|
status = FileConversionStatus(_status)
|
||||||
|
|
||||||
|
|
||||||
file_conversion = cls(
|
file_conversion = cls(
|
||||||
completed_at= completed_at,
|
completed_at=completed_at,
|
||||||
created_at= created_at,
|
created_at=created_at,
|
||||||
id= id,
|
id=id,
|
||||||
output= output,
|
output=output,
|
||||||
output_format= output_format,
|
output_format=output_format,
|
||||||
src_format= src_format,
|
src_format=src_format,
|
||||||
started_at= started_at,
|
started_at=started_at,
|
||||||
status= status,
|
status=status,
|
||||||
)
|
)
|
||||||
|
|
||||||
file_conversion.additional_properties = d
|
file_conversion.additional_properties = d
|
||||||
|
|
||||||
|
|
||||||
return file_conversion
|
return file_conversion
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class FileConversionStatus(str, Enum):
|
class FileConversionStatus(str, Enum):
|
||||||
QUEUED = 'Queued'
|
QUEUED = 'Queued'
|
||||||
UPLOADED = 'Uploaded'
|
UPLOADED = 'Uploaded'
|
||||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="GPUDevice")
|
T = TypeVar("T", bound="GPUDevice")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class GPUDevice:
|
class GPUDevice:
|
||||||
""" """
|
""" """
|
||||||
@ -53,16 +54,17 @@ class GPUDevice:
|
|||||||
|
|
||||||
peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET)
|
peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET)
|
||||||
|
|
||||||
|
|
||||||
gpu_device = cls(
|
gpu_device = cls(
|
||||||
id= id,
|
id=id,
|
||||||
memory_bus_width= memory_bus_width,
|
memory_bus_width=memory_bus_width,
|
||||||
memory_clock_rate= memory_clock_rate,
|
memory_clock_rate=memory_clock_rate,
|
||||||
name= name,
|
name=name,
|
||||||
peak_memory_bandwidth= peak_memory_bandwidth,
|
peak_memory_bandwidth=peak_memory_bandwidth,
|
||||||
)
|
)
|
||||||
|
|
||||||
gpu_device.additional_properties = d
|
gpu_device.additional_properties = d
|
||||||
|
|
||||||
|
|
||||||
return gpu_device
|
return gpu_device
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -7,6 +7,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="Instance")
|
T = TypeVar("T", bound="Instance")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class Instance:
|
class Instance:
|
||||||
""" """
|
""" """
|
||||||
@ -97,22 +98,23 @@ class Instance:
|
|||||||
|
|
||||||
zone = d.pop("zone", UNSET)
|
zone = d.pop("zone", UNSET)
|
||||||
|
|
||||||
|
|
||||||
instance = cls(
|
instance = cls(
|
||||||
cpu_platform= cpu_platform,
|
cpu_platform=cpu_platform,
|
||||||
description= description,
|
description=description,
|
||||||
environment= environment,
|
environment=environment,
|
||||||
git_hash= git_hash,
|
git_hash=git_hash,
|
||||||
hostname= hostname,
|
hostname=hostname,
|
||||||
id= id,
|
id=id,
|
||||||
image= image,
|
image=image,
|
||||||
ip_address= ip_address,
|
ip_address=ip_address,
|
||||||
machine_type= machine_type,
|
machine_type=machine_type,
|
||||||
name= name,
|
name=name,
|
||||||
zone= zone,
|
zone=zone,
|
||||||
)
|
)
|
||||||
|
|
||||||
instance.additional_properties = d
|
instance.additional_properties = d
|
||||||
|
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class PongEnum(str, Enum):
|
class PongEnum(str, Enum):
|
||||||
PONG = 'pong'
|
PONG = 'pong'
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="PongMessage")
|
T = TypeVar("T", bound="PongMessage")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class PongMessage:
|
class PongMessage:
|
||||||
""" """
|
""" """
|
||||||
@ -37,12 +38,13 @@ class PongMessage:
|
|||||||
else:
|
else:
|
||||||
message = PongEnum(_message)
|
message = PongEnum(_message)
|
||||||
|
|
||||||
|
|
||||||
pong_message = cls(
|
pong_message = cls(
|
||||||
message= message,
|
message=message,
|
||||||
)
|
)
|
||||||
|
|
||||||
pong_message.additional_properties = d
|
pong_message.additional_properties = d
|
||||||
|
|
||||||
|
|
||||||
return pong_message
|
return pong_message
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ServerEnv(str, Enum):
|
class ServerEnv(str, Enum):
|
||||||
PRODUCTION = 'production'
|
PRODUCTION = 'production'
|
||||||
DEVELOPMENT = 'development'
|
DEVELOPMENT = 'development'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ValidOutputFileFormat(str, Enum):
|
class ValidOutputFileFormat(str, Enum):
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
OBJ = 'obj'
|
OBJ = 'obj'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ValidSourceFileFormat(str, Enum):
|
class ValidSourceFileFormat(str, Enum):
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
OBJ = 'obj'
|
OBJ = 'obj'
|
||||||
|
Reference in New Issue
Block a user