-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
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).
😆 |
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uses the command: ag -l 'type ([^:]+): boolean' | \ xargs gsed -r -i.bak -e 's/type ([^:]+): boolean/type \1: bool/g'
There was a problem hiding this 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'
Thanks. For reviewing. I just added some commits for boolean -> bool, too, based on #2485 (comment) |
GAH! Next time, please "heads up new code" first, then push to the PR. (Since review already finished.) Preference: send two PRs. |
@tswast bool stuff looks good too. Ping me (or @jonparrott) when Travis is green? |
Works for me. (Two PRs next time and pinging for Travis) |
Replace types string with str.
Replace types string with str.
Replace types string with str.
Replace types string with str.
Based on this comment: #2485 (comment)
For rtypes, used the command:
For types, used the command:
Note: -r for gsed (GNU sed) is needed for group matching.