Skip to content

Conversation

@tswast
Copy link
Contributor

@tswast tswast commented Oct 21, 2016

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.
Mostly, lines that were too long.
@tswast
Copy link
Contributor Author

tswast commented Oct 21, 2016

@dhermes Okay to merge? Travis looks happy.

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

dhermes commented Oct 21, 2016

@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
Copy link
Contributor Author

tswast commented Oct 21, 2016

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
Copy link
Contributor Author

tswast commented Oct 21, 2016

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
Copy link
Contributor

dhermes commented Oct 21, 2016

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

@tswast
Copy link
Contributor Author

tswast commented Oct 21, 2016

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