GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Replace types string with str. by tswast · Pull Request #2579 · googleapis/google-cloud-python

Conversation

@tswast

@tswast tswast commented Oct 20, 2016

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tswast added 2 commits October 20, 2016 15:34
@tswast
Replace string with str in rtypes.
01b494c
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.
@tswast
Replace types string with str.
60862d1
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).
@tswast tswast assigned theacodes and dhermes Oct 20, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 20, 2016
@theacodes

theacodes commented Oct 20, 2016

Copy link
Copy Markdown
Contributor

😆

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

theacodes
theacodes approved these changes Oct 20, 2016
View reviewed changes
dhermes
dhermes reviewed Oct 20, 2016
View reviewed changes
Comment thread bigquery/google/cloud/bigquery/dataset.py
"""ID for the dataset resource.

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

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tswast
Replace types boolean with bool.
c5ded2a
Uses the command:

    ag -l 'type ([^:]+): boolean' | \
        xargs gsed -r -i.bak -e 's/type ([^:]+): boolean/type \1: bool/g'
dhermes
dhermes approved these changes Oct 20, 2016
View reviewed changes

@dhermes dhermes left a comment

Copy link
Copy Markdown
Contributor

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.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast
Replace rtypes boolean with bool.
7b18887
Uses the command:

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

tswast commented Oct 20, 2016

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 20, 2016

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 20, 2016

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tswast

tswast commented Oct 20, 2016

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tswast tswast mentioned this pull request Oct 20, 2016
Replaces integer with int in types and rtypes. #2580
Merged
@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
@dhermes
Merge pull request googleapis#2579 from tswast/str-not-string
57861ed
Replace types string with str.
@theacodes theacodes unassigned dhermes Sep 28, 2018
parthea pushed a commit that referenced this pull request Jun 4, 2023
@dhermes
Merge pull request #2579 from tswast/str-not-string
3fcb1d4
Replace types string with str.
parthea pushed a commit that referenced this pull request Oct 21, 2023
@dhermes
Merge pull request #2579 from tswast/str-not-string
b2d6a2c
Replace types string with str.
parthea pushed a commit that referenced this pull request Oct 21, 2023
@dhermes
Merge pull request #2579 from tswast/str-not-string
9827ade
Replace types string with str.
parthea pushed a commit that referenced this pull request Nov 22, 2025
@dhermes
Merge pull request #2579 from tswast/str-not-string
359f1bf
Replace types string with str.
parthea pushed a commit that referenced this pull request Nov 24, 2025
@dhermes
Merge pull request #2579 from tswast/str-not-string
2dd9324
Replace types string with str.
parthea pushed a commit that referenced this pull request Nov 24, 2025
@dhermes
Merge pull request #2579 from tswast/str-not-string
437109a
Replace types string with str.
parthea pushed a commit that referenced this pull request Nov 24, 2025
@dhermes
Merge pull request #2579 from tswast/str-not-string
884849d
Replace types string with str.
parthea pushed a commit that referenced this pull request Nov 24, 2025
@dhermes
Merge pull request #2579 from tswast/str-not-string
cb1b6f2
Replace types string with str.
parthea pushed a commit that referenced this pull request Nov 24, 2025
@dhermes
Merge pull request #2579 from tswast/str-not-string
b226ede
Replace types string with str.
parthea pushed a commit that referenced this pull request Mar 2, 2026
@dhermes
Merge pull request #2579 from tswast/str-not-string
108c854
Replace types string with str.
parthea pushed a commit that referenced this pull request Mar 9, 2026
@dhermes
Merge pull request #2579 from tswast/str-not-string
2a2f3c2
Replace types string with str.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@theacodes theacodes theacodes approved these changes
@dhermes dhermes dhermes approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@theacodes theacodes

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@tswast @theacodes @dhermes @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.