GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Update samples to support latest Google Cloud Python by theacodes · Pull Request #656 · GoogleCloudPlatform/python-docs-samples Conversation
|
|
|
||
| return tasks, cursor | ||
| tasks = list(page) | ||
| next_cusor = query_iter.next_page_token |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
next_cusor? :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| requirements = [ | ||
| requirement for requirement in requirements if not | ||
| is_ignored(requirement)] | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could put this conditional in the previous comprehension, no?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| """Ignores certain libraries.""" | ||
| for library in IGNORED_LIBRARIES: | ||
| if requirement.startswith(library): | ||
| return True |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could do this more succinctly:
return any(requirement.startswith(l) for l in IGNORED_LIBRARIES)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I like it, but it's almost too clever. I'm going to leave as-is for now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Don't care either way but don't think it's too clever, a bit more English-esque if anything.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM, shoutout to @dhermes for a lot of nice refactors that make these samples look a lot nicer. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@dpebot merge when travis passes, please. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Okay! I'll merge when all statuses are green. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Change-Id: Iab5bd07b405cf57fa7407efcfa188d1320e5f867
| # Load at most 25 results. You can change the max_results argument to load | ||
| # more rows from BigQuery, but note that this can take some time. It's | ||
| # preferred to use a query. | ||
| rows = table.fetch_data(max_results=25) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You may prefer to just consume the iterator right here:
rows = list(table.fetch_data(max_results=25))
There is too much suspense between this and the for row in rows (when the request(s) actually get made)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, done.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Change-Id: I33997d42c6202c7f916bcebd4c5a9499392ac4db
Change-Id: I9609daebbd2bfd62706193e80fde245bd1ae2566
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.