Skip to content

pynamodb: fix rate_limited_scan defaults #2167

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

Merged
merged 6 commits into from
Jun 9, 2018
Merged

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented May 27, 2018

The rate_limited_scan method has defaults for all arguments, including attributes_to_get which was omitted.

The `rate_limited_scan` method has defaults for all arguments, including `attributes_to_get` which was omitted.
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to the filter_condition parameter that I found in the docs?

Also I wish for the long line to be broken up (the horizontal scrolling makes me dizzy).

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you address @gvanrossum's comment?

Note that we have since changed the recommended line length to 130.

@ikonst
Copy link
Contributor Author

ikonst commented Jun 9, 2018

Annotating Condition and its subclasses is something I'd really like to do (been pending on python/mypy#5093 to be actually useful), but I didn't want to overload this pull request.

read_capacity_to_consume_per_second: int = ...,
max_sleep_between_retry: int = ...,
max_consecutive_exceptions: int = ...,
**filters: Any
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like consistent_read and index_name are still missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry for overlooking this.

page_size: Optional[int] = ...,
timeout_seconds: Optional[int] = ...,
read_capacity_to_consume_per_second: int = ...,
allow_rate_limited_scan_without_consumed_capacity: Optional[bool]=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaults should always be ... (you'll get a lint error for this) and = should be surrounded by spaces if there's a type annotation.

@JelleZijlstra JelleZijlstra merged commit 129df49 into python:master Jun 9, 2018
@ikonst ikonst deleted the patch-2 branch June 14, 2018 20:27
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
The `rate_limited_scan` method has defaults for all arguments, including `attributes_to_get` which was omitted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants