-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix #239: remove / document 'pragma: NO COVER' #248
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
Fix #239: remove / document 'pragma: NO COVER' #248
Conversation
Incorporate feedback from @dhermes.
|
The cleanup you are referring to in #238: Doesn't apply here, as the repeated definition is not present on master (or this branch). It could perhaps be factored out of 'gcloud.test_credentials' into something like 'gcloud._testing'. |
|
I'm pretty displeased with the E124 and related errors pep8 is spitting out by default: there is no obviously-better way to spell assertions comparing data structures that doesn't fall afoul of one I'd just as soon turn of all their "hanging indent" checks. |
|
RE: The main thrust is that things like self.assertEqual(params,
{'Signature': [SIGNED],
'Expires': ['1000'],
'GoogleAccessId': [_Credentials.service_account_name],
})are actually against PEP8 because by having self.assertEqual(params,does not make it a continuation. To make it valid, it would have to actually be a continuation self.assertEqual(
params,
{'Signature': [SIGNED],
'Expires': ['1000'],
'GoogleAccessId': [_Credentials.service_account_name],
}) |
|
Have a look at the examples under: http://legacy.python.org/dev/peps/pep-0008/#indentation They do not require that the opening paren of a function call be the last character when wrapping. E.g., this is in the "OK" block: as is this for data structures: |
|
The redundant '_Monkey' you point to is in 'gcloud.datastore.test_connection', which this PR doesn't touch: it does touch 'gcould.storage.test_connection', but reuses the '_Monkey' from 'gcloud.test_credentials'. |
|
See #250, which moves the '_Monkey' class into a new 'gcloud._testing' module (to avoid having one testcase module depend on another). |
|
@dhermes My "arguing with the ref" about pep8 E124 is actually irrelevant to this PR, because I rewrote the problematic statements to avoid it altogether. Are there remaining issues? |
|
Ah yes, good call. This PR LGTM. |
🤖 I have created a release \*beep\* \*boop\* --- ## [2.7.0](https://www.github.com/googleapis/python-monitoring/compare/v2.6.0...v2.7.0) (2021-11-09) ### Features * add CreateServiceTimeSeries RPC ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) ### Bug Fixes * **deps:** drop packaging dependency ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) * **deps:** require google-api-core >= 1.28.0 ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) * Reintroduce deprecated field/enum `ServiceTier` for backward compatibility ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) ### Miscellaneous Chores * release as 2.7.0 ([#247](https://www.github.com/googleapis/python-monitoring/issues/247)) ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) ### Documentation * list oneofs in docstring ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) * Use absolute link targets in comments ([b347e70](https://www.github.com/googleapis/python-monitoring/commit/b347e7083ff04c04e287b7afc79c425a1d04f731)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.42.0` -> `==1.42.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>googleapis/python-storage</summary> ### [`v1.42.1`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1421-httpswwwgithubcomgoogleapispython-storagecomparev1420v1421-2021-09-07) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.42.0...v1.42.1) </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(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]>
* 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: https://togithub.com/googleapis/synthtool/commit/eaef28efd179e6eeb9f4e9bf697530d074a6f3b9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f8ca7655fa8a449cadcabcbce4054f593dcbae7aeeab34aa3fcc8b5cf7a93c9e
* fix: Add async context manager return types chore: Mock return_value should not populate oneof message fields chore: Support snippet generation for services that only support REST transport chore: Update gapic-generator-python to v1.11.0 PiperOrigin-RevId: 545430278 Source-Link: googleapis/googleapis@601b532 Source-Link: googleapis/googleapis-gen@b3f18d0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjNmMThkMGY2NTYwYTg1NTAyMmZkMDU4ODY1ZTc2MjA0NzlkN2FmOSJ9 * 🦉 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>
…on time series tables (#248) * feat: added support for horizontal bar rendering and column settings on time series tables PiperOrigin-RevId: 501316608 Source-Link: googleapis/googleapis@09d97e0 Source-Link: googleapis/googleapis-gen@8085bab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODA4NWJhYjFiZGY0YjlkNzAwN2RkOTRmNWQ2Yzk3NTg4OGExNGQ3MyJ9 * 🦉 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>
* 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]>
…p/templates/python_library/.kokoro (#248) Source-Link: https://togithub.com/googleapis/synthtool/commit/bb171351c3946d3c3c32e60f5f18cee8c464ec51 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f62c53736eccb0c4934a3ea9316e0d57696bb49c1a7c86c726e9bb8a2f87dadf
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@dd05f9d Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b
Source-Link: googleapis/synthtool@dd05f9d Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b
In order to preserve the interface of legacy client construction, client constructors take a 'google.api_core.client_options.ClientOptions' parameter. Currently, this option only customizes the api endpoint, but other customizations may be enabled. Includes generated unit tests. Implementation for #227
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: add api_key to client options * update
This PR fixes an issue with the `owlbot.py` file which prevented [google/cloud/datastore_v1](https://github.com/googleapis/python-datastore/commits/main/google/cloud/datastore_v1) from being updated. This PR also brings the client up to date with the generated client in googleapis-gen [here](https://github.com/googleapis/googleapis-gen/tree/master/google/datastore). chore: update owlbot.py to properly copy folders from googleapis-gen fix(deps): require google-api-core >= 1.28.0 docs: list oneofs in docstring feat: add context manager support in client fix: add 'dict' annotation type to 'request' fix: add async client to %name_%version/init.py feat: support self-signed JWT flow for service accounts feat: Added methods for creating and deleting composite indexes
Source-Link: googleapis/synthtool@d895aec Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:98f3afd11308259de6e828e37376d18867fd321aba07826e29e4f8d9cab56bad Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore: Adjust Error Reporting branding in documentation In line with product branding guidelines, the product is 'Error Reporting' and can be referred to as 'Google Cloud Error Reporting' when appropriate, but not 'Cloud Error Reporting' fixes #248 * Adjust brand name in repo metadata Co-authored-by: losalex <[email protected]>
* docs: adds UPGRADING.md, not to readme, to help inform users about migration to v2 * docs: erroneous version number * Update UPGRADING.md Co-authored-by: BenWhitehead <[email protected]> * docs: clarify enums statement * docs: add migration section to docs index Co-authored-by: BenWhitehead <[email protected]>
This fixes issues, generally, with the handling of repeated properties with projection queries, but also specifically for the "class" property of PolyModel entities. Fixes #248
See #239 for discussion.