-
Notifications
You must be signed in to change notification settings - Fork 41
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
added docstring to logging.py and added pydocstyle to github workflow #158
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.
Thanks for the initiative! This is a good start, just one comment for now
Quality Gate passedIssues Measures |
Hi @refeed made a commit, please check. |
|
||
Here, if `verbose` is set to ``True``,then all the log messages higher than DEBUG level will be displayed in `verbose` format. | ||
But, if `verbose` is set to ``False``, all the log messages that are higher than INFO level i.e. ('INFO', 'WARNING', 'CRITICAL') will be dsiplayed in `normal` format. | ||
|
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 detailed docstring! but I think it can be made shorter
I'd write it as the following:
Set up logging configuration.
:param verbose: If set to `True` will log all messages higher than DEBUG level, otherwise it will log the messages that are higher than INFO level ('INFO', 'WARNING', 'CRITICAL')
to control the verbosity and formatting of log messages. The ``setup_logging`` function | ||
allows switching between verbose and normal logging modes. | ||
|
||
""" |
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.
We can remove the It provides a default logging configuration with different handlers and formatters to control the verbosity and formatting of log messages. The ``setup_logging`` function allows switching between verbose and normal logging modes.
part
@@ -38,6 +48,14 @@ | |||
|
|||
|
|||
def setup_logging(verbose: bool = False): | |||
|
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 remove this newline
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.
Also if you could do a rebase to the latest main, it'd be great. Otherwise, it's fine, we'll just rebase it when merging
Merged this via #188 . Thanks for the contribution! |
Hi, @refeed I have added a docstring to logging.py and also added pydocstyle to github workflow. Do checkout and let me know am i going right?