-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
add Google style docstring to web.py #746
Conversation
Thanks for this! The linter is raising some issues with having blank lines after your docstrings. Could you please address this.
|
I am a bit confused by the linting issues, with the google style docstrings you should have the docstrings like: def build_url(self, method):
"""Build the url to connect with api.
Helper function to build the url to interact with the
Rocket.Chat REST API. Uses the global variable API_PATH
that points to current api version. (example: /api/v1/)
Args:
method (string): Api call endpoint.
Return:
String that represents full API url.
""" Unless pylint got updated and they don't accept this style anymore? |
But there shouldn't be a blank line between the last |
Oh you are right haha I thought that the lint was complaining about the line between the first docstring line and the Args, bit. |
Sure thing, will get on it. |
Codecov Report
@@ Coverage Diff @@
## master #746 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 28 28
Lines 1843 1843
=====================================
Hits 1843 1843
Continue to review full report at Codecov.
|
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.
Looks like there are still some linter failures.
opsdroid/web.py
Outdated
request: web request to render opsdroid stats | ||
|
||
Returns: | ||
dict: returns successful status code and dictionary with stats requested |
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.
Looks like this line is too long. Could you add a linebreak to make it less that 80 characters.
agggh, I thought I had it. Is there a way to check for this before I push? I ran it through pylint and it checked out. Thanks, |
@GrugLife No worries, its all a learning experience 😄 👍 Basically If you get a message saying you dont have tox, just install it and run the command again |
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.
Heya thanks for working on this. You don’t need to add the \ on the dock strings you can just hit enter to separate the line and everything will work fine. So you could just remove the r from the beginning of the docstring
🎉 Thanks for bearing with us! We have quite strict linting rules in this project but I'm glad to see we got there in the end. Ping me your address via DM on Twitter or Gitter and I'll post you some opsdroid stickers! |
No worries, it's a good learning experience to work within the linting rules. And thanks for bearing with me! If you don't mind, I would like to do the same on another file. |
Please go ahead! |
* add Google style docstring to web.py * delete trailing blank line after docstring * Fix lintr failures * add r for docstring with \ * removed r and \
Description
_Add Google style docstrings to web.py per the following link:
https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
Please let me know of any changes to the current docstrings.
If all looks good, I will tackle another file.
_
#532 (web.py)
Status
READY
Type of change
Checklist: