Adding base pylint rcfile and plugin for unittests.#221
Adding base pylint rcfile and plugin for unittests.#221dhermes wants to merge 1 commit intogoogleapis:masterfrom
Conversation
|
@tseaver This is a start towards getting our code clean without having to sprinkle comments as you mentioned before. I had a lot of fun learning a bit about the internals of LMK what you think. |
|
The plugin looks very slick, but I'm worried about the maintenance cost; also, if I understand correctly, comments are the most common way of handling this, is that correct? |
|
I'm trying to read up on best practices / things people do on the web. This comment seems interesting:
I'm also looking into |
|
As in that answer, ISTM that enforcing project policy through a .pylintrc file and a ban on inline comments disabling lint leads to the best code quality. |
|
Yes it seems to be a policy which is alive and well in the Python ecosystem. I'd be interested to hear what people do in cases like this. In reality, a class with 47 public methods is doing too much, but having |
e2dfbce to
f85eeba
Compare
|
Changes Unknown when pulling f85eeba on dhermes:unittest-pylint-plugin into * on GoogleCloudPlatform:master*. |
063031d to
21b4574
Compare
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.
|
Feel free to ignore the other "Invert the test and nest the following code?" comments if you don't find the first helpful. |
|
Gotcher. I will handle uniformly depending on the resolution of our discussion. |
…221) Source-Link: googleapis/synthtool@8e55b32 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c6c965a4bf40c19011b11f87dbc801a66d3a23fbc6704102be064ef31c51f1c3 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
assign @googleapis/cdpe-cloudai as codeowner
* chore: exclude requirements.txt file from renovate-bot Source-Link: googleapis/synthtool@f58d313 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7a40313731a7cb1454eef6b33d3446ebb121836738dc3ab3d2d3ded5268c35b6 * update constraints files * fix(deps): require protobuf 3.20.2 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
…sts (#221) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 417856712 Source-Link: googleapis/googleapis@285ed91 Source-Link: googleapis/googleapis-gen@7d52805 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2Q1MjgwNTc3MjRlMWQ0Mjg4MmE3YmNkNjdiZmEwNjk1MWNiZjFjYSJ9
🤖 I have created a release *beep* *boop* --- ## [1.8.0](googleapis/python-dialogflow-cx@v1.7.0...v1.8.0) (2022-01-14) ### Features * **v3:** added `TelephonyTransferCall` in response message ([#216](googleapis/python-dialogflow-cx#216)) ([76dae8b](googleapis/python-dialogflow-cx@76dae8b)) * **v3:** added the display name of the current page in webhook requests ([#221](googleapis/python-dialogflow-cx#221)) ([aa91b72](googleapis/python-dialogflow-cx@aa91b72)) * **v3:** allow setting custom CA for generic webhooks ([#214](googleapis/python-dialogflow-cx#214)) ([8f3dc03](googleapis/python-dialogflow-cx@8f3dc03)) * **v3beta1:** added `TelephonyTransferCall` in response message ([#217](googleapis/python-dialogflow-cx#217)) ([e24bdfd](googleapis/python-dialogflow-cx@e24bdfd)) * **v3beta1:** added the display name of the current page in webhook requests ([#222](googleapis/python-dialogflow-cx#222)) ([5956179](googleapis/python-dialogflow-cx@5956179)) * **v3:** release CompareVersions API ([8f3dc03](googleapis/python-dialogflow-cx@8f3dc03)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…221) Source-Link: googleapis/synthtool@8e55b32 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c6c965a4bf40c19011b11f87dbc801a66d3a23fbc6704102be064ef31c51f1c3
* fix(deps): Require google-api-core >=1.34.0, >=2.11.0 fix: Drop usage of pkg_resources fix: Fix timeout default values docs(samples): Snippetgen should call await on the operation coroutine before calling result PiperOrigin-RevId: 493260409 Source-Link: googleapis/googleapis@fea4387 Source-Link: googleapis/googleapis-gen@387b734 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add gapic_version.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
* chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: googleapis/googleapis@f91b6cf Source-Link: googleapis/googleapis-gen@16eb360 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 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: relocate owl bot post processor
Source-Link: googleapis/synthtool@06e8279 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce
…221) Source-Link: googleapis/synthtool@95d9289 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@993985f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pytest](https://docs.pytest.org/en/latest/) ([source](https://togithub.com/pytest-dev/pytest), [changelog](https://docs.pytest.org/en/stable/changelog.html)) | `==7.0.0` -> `==7.0.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>pytest-dev/pytest</summary> ### [`v7.0.1`](https://togithub.com/pytest-dev/pytest/releases/7.0.1) [Compare Source](https://togithub.com/pytest-dev/pytest/compare/7.0.0...7.0.1) # pytest 7.0.1 (2022-02-11) ## Bug Fixes - [#​9608](https://togithub.com/pytest-dev/pytest/issues/9608): Fix invalid importing of `importlib.readers` in Python 3.9. - [#​9610](https://togithub.com/pytest-dev/pytest/issues/9610): Restore \[UnitTestFunction.obj]{.title-ref} to return unbound rather than bound method. Fixes a crash during a failed teardown in unittest TestCases with non-default \[\__init\_\_]{.title-ref}. Regressed in pytest 7.0.0. - [#​9636](https://togithub.com/pytest-dev/pytest/issues/9636): The `pythonpath` plugin was renamed to `python_path`. This avoids a conflict with the `pytest-pythonpath` plugin. - [#​9642](https://togithub.com/pytest-dev/pytest/issues/9642): Fix running tests by id with `::` in the parametrize portion. - [#​9643](https://togithub.com/pytest-dev/pytest/issues/9643): Delay issuing a `~pytest.PytestWarning`{.interpreted-text role="class"} about diamond inheritance involving `~pytest.Item`{.interpreted-text role="class"} and `~pytest.Collector`{.interpreted-text role="class"} so it can be filtered using `standard warning filters <warnings>`{.interpreted-text role="ref"}. </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- 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-tasks).
* feat: update v1 proto PiperOrigin-RevId: 410256789 Source-Link: googleapis/googleapis@b3ff183 Source-Link: googleapis/googleapis-gen@488fbdc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDg4ZmJkYzQ2OTYyZDhiMGM3N2FmNzA2ZmFhNTUyYjlmYjVhNzFiOCJ9 * 🦉 Updates from OwlBot 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\* --- ## [2.9.0](https://www.github.com/googleapis/python-texttospeech/compare/v2.8.0...v2.9.0) (2021-11-16) ### Features * update v1 proto ([#221](https://www.github.com/googleapis/python-texttospeech/issues/221)) ([e8776d7](https://www.github.com/googleapis/python-texttospeech/commit/e8776d7a482f495ed5ae0e1235609e3e2d3e6067)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
chore: relocate owl bot post processor
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
* chore(samples): Adding samples for custom hostname * chore(samples): Changing zone for tests, as europe-central2-c seems to have capcity issues with e2 instances.
Source-Link: googleapis/synthtool@52aef91 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:36a95b8f494e4674dc9eee9af98961293b51b86b3649942aac800ae6c1f796d4 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: googleapis/googleapis-gen@63a1db7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
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>
No description provided.