-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fixed a majority of pep8 errors in gcloud. #200
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
Conversation
|
I should run |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
$ pep8 --ignore=E111 gcloud/datastore/demo/__init__.py
gcloud/datastore/demo/__init__.py:8:80: E501 line too long (92 > 79 characters)
$ pep8 --ignore=E111 gcloud/datastore/entity.py
gcloud/datastore/entity.py:46:80: E501 line too long (86 > 79 characters)
gcloud/datastore/entity.py:51:80: E501 line too long (83 > 79 characters)
gcloud/datastore/entity.py:58:80: E501 line too long (84 > 79 characters)
gcloud/datastore/entity.py:71:80: E501 line too long (82 > 79 characters)
gcloud/datastore/entity.py:119:80: E501 line too long (88 > 79 characters)
gcloud/datastore/entity.py:124:80: E501 line too long (85 > 79 characters)
gcloud/datastore/entity.py:138:80: E501 line too long (101 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/acl.py
gcloud/storage/acl.py:382:80: E501 line too long (81 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/bucket.py
gcloud/storage/bucket.py:105:80: E501 line too long (81 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/connection.py
gcloud/storage/connection.py:467:80: E501 line too long (80 > 79 characters)
gcloud/storage/connection.py:479:80: E501 line too long (93 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/demo/__init__.py
gcloud/storage/demo/__init__.py:8:80: E501 line too long (92 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/iterator.py
gcloud/storage/iterator.py:149:80: E501 line too long (91 > 79 characters)
gcloud/storage/iterator.py:177:80: E501 line too long (85 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/key.py
gcloud/storage/key.py:98:80: E501 line too long (81 > 79 characters)
gcloud/storage/key.py:211:9: E123 closing bracket does not match indentation of opening bracket's line
gcloud/storage/key.py:235:11: E123 closing bracket does not match indentation of opening bracket's line
$ pep8 --ignore=E111 gcloud/storage/test_bucket.py
gcloud/storage/test_bucket.py:353:80: E501 line too long (80 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/test_connection.py
gcloud/storage/test_connection.py:158:44: E241 multiple spaces after ':'
gcloud/storage/test_connection.py:173:44: E241 multiple spaces after ':'
gcloud/storage/test_connection.py:189:44: E241 multiple spaces after ':'
gcloud/storage/test_connection.py:209:44: E241 multiple spaces after ':'
gcloud/storage/test_connection.py:226:44: E241 multiple spaces after ':'
gcloud/storage/test_connection.py:276:44: E241 multiple spaces after ':'
gcloud/storage/test_connection.py:296:44: E241 multiple spaces after ':' |
|
To fix the indents, I have been testing out a combination of I am happy to continue that effort after this commit gets checked in. We also want to pass |
|
I ran Nine of them check out just fine: However, the following errors were detected: $ pep8 --ignore=E111 gcloud/datastore/connection.py
gcloud/datastore/connection.py:76:9: E123 closing bracket does not match indentation of opening bracket's line
gcloud/datastore/connection.py:159:80: E501 line too long (81 > 79 characters)
gcloud/datastore/connection.py:229:80: E501 line too long (88 > 79 characters)
$ pep8 --ignore=E111 gcloud/datastore/query.py
gcloud/datastore/query.py:50:7: E123 closing bracket does not match indentation of opening bracket's line
gcloud/datastore/query.py:66:80: E501 line too long (93 > 79 characters)
$ pep8 --ignore=E111 gcloud/storage/demo/__init__.py
gcloud/storage/demo/__init__.py:8:80: E501 line too long (92 > 79 characters)In addition, the file |
3f3d0f1 to
b8a989f
Compare
|
@dhermes definitely leave the generated 'datastore_v1_pb2.py' as-is. |
gcloud/datastore/connection.py
Outdated
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.
|
We need to debate / document the style guide (by reference / delta to whatever authoritative specs we choose), and then automate testing of them (e.g., via something like 'tox -e lint', including automating exceptions). |
|
RE: automation, I checked out this branch and tested every In addition to passing |
|
@dhermes Go ahead and do it with your script. Yep sounds good. |
|
@kleyow Since you've already done a bulk of the work, let's check this in and then I can tackle the rest with the automated tools. You can ignore the two files left out: @tseaver Does this sound good? |
|
Whoops misclicked, issues were fixed in kleyow@b8a989f |
|
Should I switch to in this ticket. |
|
Yes please do. Also run |
5efa5f1 to
f4fc666
Compare
f4fc666 to
cd0843f
Compare
) Source-Link: https://togithub.com/googleapis/synthtool/commit/0c7b0333f44b2b7075447f43a121a12d15a7b76a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547
- [ ] Regenerate this pull request now. docs: list oneofs in docstring fix(deps): require google-api-core >= 1.28.0 fix(deps): drop packaging dependency committer: busunkim96@ PiperOrigin-RevId: 406468269 Source-Link: googleapis/googleapis@83d81b0 Source-Link: googleapis/googleapis-gen@2ff001f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9
adding label example when writing a timeseries in python Remaking this due to the commit lint failure in #200 and it being easier to just make a new PR. Closing #200. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [✔️] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-monitoring/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [✔️ for linter, unable to run the nox tests because of issues unrelated] Ensure the tests and linter pass - [✔️] Code coverage does not decrease (if any source code was changed) - [✔️, no doc updates required ] Appropriate docs were updated (if necessary) Fixes #200 🦕
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [backoff](https://togithub.com/litl/backoff) | `==1.11.0` -> `==1.11.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>litl/backoff</summary> ### [`v1.11.1`](https://togithub.com/litl/backoff/blob/master/CHANGELOG.md#v1111-2021-07-14) [Compare Source](https://togithub.com/litl/backoff/compare/v1.11.0...v1.11.1) ##### Changed - Update **version** in backoff module </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-translate).
* chore: Update gapic-generator-python to v1.8.2 PiperOrigin-RevId: 504289125 Source-Link: googleapis/googleapis@38a48a4 Source-Link: googleapis/googleapis-gen@b2dc226 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJkYzIyNjYzZGJlNDdhOTcyYzhkOGMyZjhhNGRmMDEzZGFmZGNiYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [3.7.1](https://www.github.com/googleapis/python-cloudbuild/compare/v3.7.0...v3.7.1) (2021-11-05) ### Bug Fixes * **deps:** require google-api-core >= 1.28.0, drop packaging dep ([f3fb436](https://www.github.com/googleapis/python-cloudbuild/commit/f3fb4367ba598506d4cdd296870b61a8ffad75ef)) ### Documentation * list oneofs in docstring ([f3fb436](https://www.github.com/googleapis/python-cloudbuild/commit/f3fb4367ba598506d4cdd296870b61a8ffad75ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 459095142 Source-Link: googleapis/googleapis@4f1be99 Source-Link: googleapis/googleapis-gen@ae686d9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU2ODZkOWNkZTRmYzNlMzZkMGFjMDJlZmI4NjQzYjE1ODkwYzFlZCJ9 feat: add audience parameter PiperOrigin-RevId: 456827138 Source-Link: googleapis/googleapis@23f1a15 Source-Link: googleapis/googleapis-gen@4075a85 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA3NWE4NTE0ZjY3NjY5MWVjMTU2Njg4YTViYmYxODNhYTk4OTNjZSJ9
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/python-bigquery-storage/compare/v2.4.0...v2.5.0) (2021-06-29) ### ⚠ BREAKING CHANGES * remove default deadline for AppendRows API (#205) ### Features * Add ZSTD compression as an option for Arrow ([#197](https://www.github.com/googleapis/python-bigquery-storage/issues/197)) ([f941446](https://www.github.com/googleapis/python-bigquery-storage/commit/f9414469fac37bf05db28230a1a6c1e3f7342e8d)) * new JSON type through BigQuery Write ([#178](https://www.github.com/googleapis/python-bigquery-storage/issues/178)) ([a6d6afa](https://www.github.com/googleapis/python-bigquery-storage/commit/a6d6afa8654907701aab2724f940be8f63edd0ea)) ### Bug Fixes * **deps:** add packaging requirement ([#200](https://www.github.com/googleapis/python-bigquery-storage/issues/200)) ([f2203fe](https://www.github.com/googleapis/python-bigquery-storage/commit/f2203fefe36dd043a258adb85e970fef14cf6ebc)) * remove default deadline for AppendRows API ([#205](https://www.github.com/googleapis/python-bigquery-storage/issues/205)) ([cd4e637](https://www.github.com/googleapis/python-bigquery-storage/commit/cd4e637c4c74f21be50c3b0ebdfeebb1dfb88cbb)) ### Documentation * omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([#1127](https://www.github.com/googleapis/python-bigquery-storage/issues/1127)) ([#212](https://www.github.com/googleapis/python-bigquery-storage/issues/212)) ([8bcc4cd](https://www.github.com/googleapis/python-bigquery-storage/commit/8bcc4cd298eb0f5da03ecf66670982ab41e35c88)) ### Miscellaneous Chores * release 2.5.0 ([#220](https://www.github.com/googleapis/python-bigquery-storage/issues/220)) ([946c8a9](https://www.github.com/googleapis/python-bigquery-storage/commit/946c8a91c2d74c6bf37b333a4d0483f4483dcbce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/python-bigquery-storage/compare/v2.4.0...v2.5.0) (2021-06-29) ### ⚠ BREAKING CHANGES * remove default deadline for AppendRows API (#205) ### Features * Add ZSTD compression as an option for Arrow ([#197](https://www.github.com/googleapis/python-bigquery-storage/issues/197)) ([f941446](https://www.github.com/googleapis/python-bigquery-storage/commit/f9414469fac37bf05db28230a1a6c1e3f7342e8d)) * new JSON type through BigQuery Write ([#178](https://www.github.com/googleapis/python-bigquery-storage/issues/178)) ([a6d6afa](https://www.github.com/googleapis/python-bigquery-storage/commit/a6d6afa8654907701aab2724f940be8f63edd0ea)) ### Bug Fixes * **deps:** add packaging requirement ([#200](https://www.github.com/googleapis/python-bigquery-storage/issues/200)) ([f2203fe](https://www.github.com/googleapis/python-bigquery-storage/commit/f2203fefe36dd043a258adb85e970fef14cf6ebc)) * remove default deadline for AppendRows API ([#205](https://www.github.com/googleapis/python-bigquery-storage/issues/205)) ([cd4e637](https://www.github.com/googleapis/python-bigquery-storage/commit/cd4e637c4c74f21be50c3b0ebdfeebb1dfb88cbb)) ### Documentation * omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([#1127](https://www.github.com/googleapis/python-bigquery-storage/issues/1127)) ([#212](https://www.github.com/googleapis/python-bigquery-storage/issues/212)) ([8bcc4cd](https://www.github.com/googleapis/python-bigquery-storage/commit/8bcc4cd298eb0f5da03ecf66670982ab41e35c88)) ### Miscellaneous Chores * release 2.5.0 ([#220](https://www.github.com/googleapis/python-bigquery-storage/issues/220)) ([946c8a9](https://www.github.com/googleapis/python-bigquery-storage/commit/946c8a91c2d74c6bf37b333a4d0483f4483dcbce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* add test for single row & column * remove old comment
Additional clean up following googleapis/google-auth-library-python-httplib2#197
Source-Link: googleapis/synthtool@453a5d9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: add iterator capability to *Iterator classes The *Iterator classes are only _iterables_, and this commit also makes them _iterators_, i.e. calling next(iterator) on them now works. * Make AsyncIterator an actual async iterator
* Refactored Entity loading and changed sorting to only occur if all ids are digits. --------- Co-authored-by: Holt Skinner <[email protected]>
…ed. (#200) * Fix OAuth2 credentials to inherit from ReadOnlyScoped instead of Scoped. * Remove unused pytest
No description provided.