FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove None & NoneType from parameter types in docstrings. by tswast · Pull Request #2584 · googleapis/google-cloud-python · GitHub

Remove None & NoneType from parameter types in docstrings. - #2584

Merged
dhermes merged 3 commits into
googleapis:masterfrom
tswast:nonetype-to-optional
Oct 21, 2016
Merged

Remove None & NoneType from parameter types in docstrings.#2584
dhermes merged 3 commits into
googleapis:masterfrom
tswast:nonetype-to-optional

Conversation

tswast commented Oct 21, 2016

Copy link
Copy Markdown
Contributor

Based on comment: #2580 (review)

Uses this script:
https://gist.github.com/tswast/fa8bd1cbdf84e0777109d217c2271622

I manually adjusted whitespace to fix lint errors.

This runs a script to remove None from the types for parameters, and
added (Optional) to the description. Does not pass lint due to some
too-long lines. I will clean those up manually.

See:
googleapis#2580 (review)
It looks like there was a mistake in copy-pasting parameter
documentation. All the descriptions were for the expiration time.

tswast commented Oct 21, 2016

Copy link
Copy Markdown
Contributor Author

@dhermes Okay to merge? Travis looks happy.

googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 21, 2016
dhermes merged commit 491519d into googleapis:master Oct 21, 2016
tswast deleted the nonetype-to-optional branch October 21, 2016 21:46

dhermes commented Oct 21, 2016

Copy link
Copy Markdown
Contributor

@tswast Am I crazy:

$ git grep -l NoneType
bigquery/google/cloud/bigquery/client.py
bigquery/google/cloud/bigquery/dataset.py
bigquery/google/cloud/bigquery/job.py
bigquery/google/cloud/bigquery/query.py
bigquery/google/cloud/bigquery/table.py
bigtable/google/cloud/bigtable/client.py
bigtable/google/cloud/bigtable/column_family.py
bigtable/google/cloud/bigtable/table.py
core/google/cloud/_helpers.py
core/google/cloud/client.py
core/google/cloud/connection.py
datastore/google/cloud/datastore/client.py
datastore/google/cloud/datastore/key.py
datastore/google/cloud/datastore/query.py
dns/google/cloud/dns/changes.py
dns/google/cloud/dns/client.py
dns/google/cloud/dns/zone.py
error_reporting/google/cloud/error_reporting/client.py
logging/google/cloud/logging/client.py
logging/google/cloud/logging/logger.py
logging/google/cloud/logging/metric.py
logging/google/cloud/logging/sink.py
monitoring/google/cloud/monitoring/client.py
pubsub/google/cloud/pubsub/client.py
pubsub/google/cloud/pubsub/subscription.py
pubsub/google/cloud/pubsub/topic.py
resource_manager/google/cloud/resource_manager/client.py
resource_manager/google/cloud/resource_manager/project.py
scripts/rewrite_imports.py
speech/google/cloud/speech/client.py
storage/google/cloud/storage/_helpers.py
storage/google/cloud/storage/acl.py
storage/google/cloud/storage/blob.py
storage/google/cloud/storage/bucket.py
storage/google/cloud/storage/client.py
vision/google/cloud/vision/client.py
$ git log -1 --pretty=%H
1fab75689b56bc67d08e4726175b4a41a82fbef7

tswast commented Oct 21, 2016

Copy link
Copy Markdown
Contributor Author

Not crazy, I noticed a few, too, since sending that PR. Most are :rtype: which I didn't remove (waiting until we decide how to document these) and some are where the NoneType spilled onto a second line from the parameter type.

tswast commented Oct 21, 2016

Copy link
Copy Markdown
Contributor Author

Ouch, I see some lines like :type message: Protobuf message or :class:NoneType`` I'm somewhat surprise the script didn't catch these. Although, I guess this one is because the first type has a space in it.

dhermes commented Oct 21, 2016

Copy link
Copy Markdown
Contributor

No worries, at least we made it some of the way to the finish line?

tswast commented Oct 21, 2016

Copy link
Copy Markdown
Contributor Author

Yeah 407 lines of progress. :-)

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Oct 21, 2023
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Mar 2, 2026
Remove None & NoneType from parameter types in docstrings.
parthea pushed a commit that referenced this pull request Mar 9, 2026
Remove None & NoneType from parameter types in docstrings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL