Conversation
pvizeli
left a comment
There was a problem hiding this comment.
Looks amazing. Only some small inputs
|
|
||
|
|
||
| class UnknownError(CloudError): | ||
| """Raised when an unknown error occurrs.""" |
|
|
||
|
|
||
| class CloudError(Exception): | ||
| """Base class for cloud related errors.""" |
There was a problem hiding this comment.
I think that should be inside __init__
There was a problem hiding this comment.
These are the class docstrings. There is no need to implement __init__ because we want to keep the base class constructor.
| from .const import AUTH_FILE, SERVERS | ||
| from .util import get_mode | ||
|
|
||
| _LOGGER = logging.getLogger(__name__) |
There was a problem hiding this comment.
Should have a REQUIREMENTS for botocore
There was a problem hiding this comment.
Botocore comes as part of Warrant.
| raise _map_aws_exception(err) | ||
|
|
||
|
|
||
| class Auth: |
There was a problem hiding this comment.
I know that is not needed but we use on most place class Bla(object):
| return self.json(cloud.account) | ||
| @asyncio.coroutine | ||
| @_handle_cloud_errors | ||
| @RequestDataValidator(vol.Schema({ |
There was a problem hiding this comment.
I think we should defined the Schema not inline. Maybe in cloud/const.py or cloud/schema.py
There was a problem hiding this comment.
but it's only used right here? Defining it in const makes it seem like we plan on re-using it, which is not the case.
There was a problem hiding this comment.
I kinda like that it is defined close to where it is used, there is no need to look around for it.
|
|
||
| @asyncio.coroutine | ||
| @_handle_cloud_errors | ||
| @RequestDataValidator(vol.Schema({ |
There was a problem hiding this comment.
I think we should defined the Schema not inline. Maybe in cloud/const.py or cloud/schema.py
|
|
||
| @asyncio.coroutine | ||
| @_handle_cloud_errors | ||
| @RequestDataValidator(vol.Schema({ |
There was a problem hiding this comment.
I think we should defined the Schema not inline. Maybe in cloud/const.py or cloud/schema.py
|
|
||
| @asyncio.coroutine | ||
| @_handle_cloud_errors | ||
| @RequestDataValidator(vol.Schema({ |
There was a problem hiding this comment.
I think we should defined the Schema not inline. Maybe in cloud/const.py or cloud/schema.py
|
|
||
| @asyncio.coroutine | ||
| @_handle_cloud_errors | ||
| @RequestDataValidator(vol.Schema({ |
There was a problem hiding this comment.
I think we should defined the Schema not inline. Maybe in cloud/const.py or cloud/schema.py
Description:
Finish the cloud logic: register, forgot password flows.
Checklist:
If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests pass