-
Notifications
You must be signed in to change notification settings - Fork 20
Cut the cookies, added the code, and deleted the todos #1
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
Conversation
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.
This is great! Thanks for doing this up. I have some formatting suggestions. Please update the rest of the docstrings with the :param label: desc
format I suggested on the first one. I did not put comments on all of them, only the first one. Thanks!
adafruit_logger.py
Outdated
__version__ = "0.0.0-auto.0" | ||
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Logger.git" | ||
|
||
import time |
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.
Please place this import on line 45 and delete the # imports
comment.
adafruit_logger.py
Outdated
|
||
@property | ||
def level(self): | ||
"""Get the level.""" |
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.
You can simply docstring this as The level.
. We try to stay away from using "Get" and "Set".
adafruit_logger.py
Outdated
|
||
@level.setter | ||
def level(self, value): | ||
"""Set the level.""" |
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.
setter
s do not need to be docstringed. You can remove this.
adafruit_logger.py
Outdated
|
||
def log(self, level, format_string, *args): | ||
"""Log a message. | ||
level -- the priority level at which to log |
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.
Please use :param level: The priority level at which to log
formatting for documenting keywords. Include whitespace above the first :param
and below the last :param
, but it is not necessary between :params
.
e.g.
"""Log a message.
:param level: The priority of the level at which to log.
:param format_string: the core message string with embedded formatting directives
:param args: arguments ``format_string.format()``, can be empty
"""
adafruit_logger.py
Outdated
def log(self, level, format_string, *args): | ||
"""Log a message. | ||
level -- the priority level at which to log | ||
format_string -- the core mesage string with embedded formatting directives |
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.
message
typo.
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.
Thanks for the updates!
There is an example in the Readme, that uses the UartHandler, but that is not in the code yet, correct, or am I totally missing something.... very possible |
No description provided.