-
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
Fixed a majority of pep8 errors in gcloud. #200
Conversation
I should run |
@@ -69,6 +69,7 @@ def get_connection(client_email, private_key_path): | |||
client_email, private_key_path, scope=SCOPE) | |||
return Connection(credentials=credentials) | |||
|
|||
|
|||
def get_dataset(dataset_id, client_email, private_key_path): | |||
"""Shortcut method to establish a connection to a particular dataset in the Cloud Datastore. |
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. |
@@ -72,8 +72,7 @@ def _request(self, dataset_id, method, data): | |||
""" | |||
headers = { | |||
'Content-Type': 'application/x-protobuf', | |||
'Content-Length': str(len(data)), | |||
} | |||
'Content-Length': str(len(data)), } |
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
Co-authored-by: Anthonios Partheniou <[email protected]>
🤖 I have created a release \*beep\* \*boop\* --- ### [2.7.2](https://www.github.com/googleapis/python-secret-manager/compare/v2.7.1...v2.7.2) (2021-09-24) ### Bug Fixes * add 'dict' annotation type to 'request' ([b5e0c81](https://www.github.com/googleapis/python-secret-manager/commit/b5e0c818eeca22cae59406693f435595d2b92f8d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Source-Link: https://togithub.com/googleapis/synthtool/commit/0ddbff8012e47cde4462fe3f9feab01fbc4cdfd6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bced5ca77c4dda0fd2f5d845d4035fc3c5d3d6b81f245246a36aee114970082b
Source-Link: googleapis/synthtool@694118b Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ec49167c606648a063d1222220b48119c912562849a0528f35bfb592a9f72737 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@56da63e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:993a058718e84a82fda04c3177e58f0a43281a996c7c395e0a56ccc4d6d210d7 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
Source-Link: googleapis/synthtool@facee4c Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@571ee2c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:660abdf857d3ab9aabcd967c163c70e657fcc5653595c709263af5f3fa23ef67
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:58c7342b0bccf85028100adaa3d856cb4a871c22ca9c01960d996e66c40548ce
Source-Link: googleapis/synthtool@ca87909 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6162c384d685c5fe22521d3f37f6fc732bf99a085f6d47b677dbcae97fc21392
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore(deps): update dependency google-cloud-storage to v2.1.0 * add pin for google-cloud-storage for py3.6 Co-authored-by: Anthonios Partheniou <[email protected]>
) 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 🦕
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](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` | [![age](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/compatibility-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/confidence-slim/1.11.0)](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
No description provided.