-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 doc string to PageIterator
#2685
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2685 +/- ##
========================================
Coverage 95.29% 95.29%
========================================
Files 60 60
Lines 12252 12252
========================================
Hits 11676 11676
Misses 576 576
Continue to review full report at Codecov.
|
7896c8f
to
630c04a
Compare
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.
Minor clarification and formatting tweaks. Otherwise, looks good!
botocore/paginate.py
Outdated
@@ -186,7 +186,8 @@ def get_paginator(self, operation_name): | |||
|
|||
class PageIterator: | |||
"""An iterable object to pagiante API results. | |||
Please note it is NOT a python iterator""" | |||
Please note it is NOT a python iterator. | |||
Use ``iter`` to wrap this as a generator""" |
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.
Can we make sure to include a period at the end of the last sentence? We'll also want to make sure the closing """
is on its own line.
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.
Sure. Should the opening quotes be on their own line too?
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.
No we can keep it on the same line. The example in the first comment should have what's considered standard formatting for doc strings.
While we don't adhere strictly to PEP8 anymore, the conventions for docstrings are still widely used. Generally to the effect of:
class MyClass:
"""This is my class.
Extra info beyond the class description.
"""
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.
Got it thanks! Pushing up now
* release-1.27.4: Bumping version to 1.27.4 Update to latest endpoints Update to latest models Add doc string to `PageIterator` (#2685)
Addressing #2396
While ideally we would add
next
functionality toPageIterator
or simply update the name of the class to prevent confusion, both would cause breaking changes. As a result all we really can do is add a doc string with additional info. Perhaps using a warning here would be warranted, but decided against it.Let me know if there's anything that should be added to the doc string.