-
-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update apidocs for sphinx-generated documentation, which follows at l… #93
Conversation
@@ -282,7 +309,15 @@ def __repr__(self) -> str: | |||
|
|||
|
|||
class ConsumableStatus: | |||
"""Container for consumable status information.""" | |||
"""Container for consumable status information, | |||
including information about brushes and duration until they should be changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
return error_codes[self.data[4]] | ||
|
||
@property | ||
def complete(self) -> bool: | ||
"""Return True if the cleaning run was complete (e.g. without errors), see also :func:`error`.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (105 > 79 characters)
return int(self.data[2]) | ||
|
||
@property | ||
def ids(self) -> List[int]: | ||
"""A list of available cleaning IDs, see also :class:`CleaningDetails`.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
return self.is_on | ||
# we are not using in_cleaning as it does not seem to work properly. | ||
# return bool(self.data["in_cleaning"]) | ||
|
||
@property | ||
def is_on(self) -> bool: | ||
"""Return True if cleaning (automatic, manual or spot).""" | ||
"""True if device is currently cleaning (either automatic, manual or spot).""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
return bool(self.data["map_present"]) | ||
|
||
@property | ||
@deprecated("See is_on") | ||
def in_cleaning(self) -> bool: | ||
"""True if currently cleaning. Please use :func:`is_on` instead of this.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
@@ -161,7 +190,14 @@ def discover(addr: str=None) -> Any: | |||
break | |||
|
|||
def send(self, command: str, parameters: Any=None, retry_count=3) -> Any: | |||
"""Build and send the given command.""" | |||
"""Build and send the given command. | |||
Note that this will implicitly call :func:`do_discover` to do a handshake, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
"""Base class for all device implementations. | ||
This is the main class providing the basic protocol handling for devices using | ||
the ``miIO`` protocol. | ||
This class should not be initialized directly but a device-specific class inheriting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
return self.data | ||
|
||
|
||
class Device: | ||
"""Base class for all device implementations.""" | ||
"""Base class for all device implementations. | ||
This is the main class providing the basic protocol handling for devices using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
miio/android_backup.py
Outdated
tar = self.read_tar(password) | ||
return tar.list() | ||
|
||
def pack(self, fname, password=None): | ||
"""Pack given directory `fname`, and encrypt with `password` if given.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
miio/android_backup.py
Outdated
def __init__(self, fname=None): | ||
"""Initializes AndroidBackup. | ||
If `fname` is given, the file will be opened for reading in binary mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
] | ||
|
||
intersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line at end of file
docs/conf.py
Outdated
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode', | ||
'sphinx.ext.githubpages', | ||
'sphinx.ext.intersphinx'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
'sphinx.ext.todo', | ||
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode', | ||
'sphinx.ext.githubpages', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
docs/conf.py
Outdated
'sphinx_autodoc_typehints', | ||
'sphinx.ext.todo', | ||
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
] | ||
|
||
intersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line at end of file
docs/conf.py
Outdated
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode', | ||
'sphinx.ext.githubpages', | ||
'sphinx.ext.intersphinx'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
'sphinx.ext.todo', | ||
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode', | ||
'sphinx.ext.githubpages', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
docs/conf.py
Outdated
'sphinx_autodoc_typehints', | ||
'sphinx.ext.todo', | ||
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
5923752
to
4990c1b
Compare
I will review the PR this week! |
Great, thanks! Running |
…ater point. Includes also some slight clean-ups.
fd0d68c
to
d04570a
Compare
* Add Iterator import * Remove android_backup documentation as we have moved to use upstream lib
1 similar comment
I will merge this now, we can do adjustments & reviews also after it has been merged (and this allows pointing users to readthedocs for help). |
…ater point. Includes also some slight clean-ups.
Note: marking this as WIP as the sphinx-generated doc part will follow at later point in time. For now this is here up for a review & to wait for fixing a couple of added FIXMEs.
The idea is to tidy up the README.md (and convert to .rst), and have a proper separated documentation.