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

Replace types string with str. #2579

Merged
merged 4 commits into from
Oct 21, 2016
Merged

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Oct 20, 2016

Based on this comment: #2485 (comment)

For rtypes, used the command:

ag -l 'rtype: string' | xargs sed -i .bak 's/rtype: string/rtype: str/g'

For types, used the command:

ag -l 'type ([^:]+): string' | \
    xargs gsed -r -i.bak -e 's/type ([^:]+): string/type \1: str/g'

Note: -r for gsed (GNU sed) is needed for group matching.

Used the command:
ag -l 'rtype: string' | xargs sed -i .bak 's/rtype: string/rtype: str/g'

Based on this comment:
googleapis#2485 (comment)

`str` is a type, `string` is a module.
Uses command:

    ag -l 'type ([^:]+): string' | \
        xargs gsed -r -i.bak -e 's/type ([^:]+): string/type \1: str/g'

Note: [-r for gsed (GNU sed) is needed for group
matching](http://superuser.com/a/336819/125262).
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 20, 2016
@theacodes
Copy link
Contributor

😆

@@ -168,7 +168,7 @@ def created(self):
def dataset_id(self):
"""ID for the dataset resource.

:rtype: string, or ``NoneType``
:rtype: str, or ``NoneType``

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Uses the command:

    ag -l 'type ([^:]+): boolean' | \
        xargs gsed -r -i.bak -e 's/type ([^:]+): boolean/type \1: bool/g'
Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

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

I actually reviewed every line. Why? Because I'm crazy.

LGTM

(I think it'll be hilarious if Travis / Sphinx barfs on this.)

Uses the command:

    ag -l 'rtype: boolean' | xargs sed -i .bak 's/rtype: boolean/rtype: bool/g'
@tswast
Copy link
Contributor Author

tswast commented Oct 20, 2016

Thanks. For reviewing. I just added some commits for boolean -> bool, too, based on #2485 (comment)

@dhermes
Copy link
Contributor

dhermes commented Oct 20, 2016

Thanks. For reviewing. I just added some commits for boolean -> bool, too

GAH! Next time, please "heads up new code" first, then push to the PR. (Since review already finished.) Preference: send two PRs.

@dhermes
Copy link
Contributor

dhermes commented Oct 20, 2016

@tswast bool stuff looks good too. Ping me (or @jonparrott) when Travis is green?

@tswast
Copy link
Contributor Author

tswast commented Oct 20, 2016

Works for me. (Two PRs next time and pinging for Travis)

@dhermes dhermes merged commit 22941e2 into googleapis:master Oct 21, 2016
@tswast tswast deleted the str-not-string branch October 21, 2016 16:07
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
parthea pushed a commit that referenced this pull request Jun 4, 2023
Replace types string with str.
parthea pushed a commit that referenced this pull request Oct 21, 2023
Replace types string with str.
parthea pushed a commit that referenced this pull request Oct 21, 2023
Replace types string with str.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants