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

fix: remove trailing commas from error message constants #505

Merged
merged 2 commits into from Jul 15, 2021

Conversation

rjw57
Copy link
Contributor

@rjw57 rjw57 commented Jul 15, 2021

The _DOWNLOAD_AS_STRING_DEPRECATED constant includes a dangling comma
which makes it a tuple and not a string. This causes a TypeError as reported in #501.

Fixes #501

@rjw57 rjw57 requested a review from a team July 15, 2021 09:48
@rjw57 rjw57 requested a review from a team as a code owner July 15, 2021 09:48
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Jul 15, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 15, 2021
@parthea parthea added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jul 15, 2021
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 15, 2021
@parthea parthea changed the title blob.py: remove dangling comma in _DOWNLOAD_AS_STRING_DEPRECATED fix: TypeError in blob.download_as_string() Jul 15, 2021
@parthea parthea changed the title fix: TypeError in blob.download_as_string() fix: TypeError in blob.download_as_string Jul 15, 2021
@parthea parthea requested a review from tseaver July 15, 2021 13:31
@parthea parthea changed the title fix: TypeError in blob.download_as_string fix(Python 2.7): TypeError in blob.download_as_string Jul 15, 2021
@parthea parthea changed the title fix(Python 2.7): TypeError in blob.download_as_string fix: TypeError in blob.download_as_string Jul 15, 2021
Copy link
Contributor

@tseaver tseaver left a comment

Choose a reason for hiding this comment

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

Thanks very much for the patch! Can you please also remove the trailing commas for _COMPOSE_IF_GENERATION_LIST_DEPRECATED and _COMPOSE_IF_GENERATION_LIST_AND_IF_SOURCE_GENERATION_ERROR?

@tseaver tseaver changed the title fix: TypeError in blob.download_as_string fix: remove trailing commas from error message constants Jul 15, 2021
The _DOWNLOAD_AS_STRING_DEPRECATED,
_COMPOSE_IF_GENERATION_LIST_DEPRECATED and
_COMPOSE_IF_GENERATION_LIST_AND_IF_SOURCE_GENERATION_ERROR constants
include a dangling comma which make them tuples and not strings. This
causes a TypeError as reported in googleapis#501.

Closes googleapis#501
@rjw57
Copy link
Contributor Author

rjw57 commented Jul 15, 2021

Thanks very much for the patch! Can you please also remove the trailing commas for _COMPOSE_IF_GENERATION_LIST_DEPRECATED and _COMPOSE_IF_GENERATION_LIST_AND_IF_SOURCE_GENERATION_ERROR?

Done. I should've looked myself for any other offenders(!)

@tseaver tseaver added the automerge Merge the pull request once unit tests and other checks pass. label Jul 15, 2021
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 15, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 15, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit d4a86ce into googleapis:master Jul 15, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 15, 2021
@rjw57 rjw57 deleted the patch-1 branch July 15, 2021 16:23
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
)

The _DOWNLOAD_AS_STRING_DEPRECATED constant includes a dangling comma
which makes it a tuple and not a string. This causes a TypeError as reported in googleapis#501.

Fixes googleapis#501
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
)

The _DOWNLOAD_AS_STRING_DEPRECATED constant includes a dangling comma
which makes it a tuple and not a string. This causes a TypeError as reported in googleapis#501.

Fixes googleapis#501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: expected string or bytes-like object
4 participants