Skip to content
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

Merged
merged 3 commits into from
Jun 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion botocore/paginate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.
    """

Copy link
Contributor Author

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


def __init__(
self,
Expand Down