Skip to content
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

Making all modules in gcloud package pylint compliant. #210

Closed
wants to merge 3 commits into from

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Oct 2, 2014

No description provided.

@tseaver
Copy link
Contributor

tseaver commented Oct 3, 2014

Rather than sprinkling the code with comments to turn off pylint stuff, I'd rather we added a '.pylintrc' file (or whatever it should be called) which spells out the styles as we want to test them.

For instance, instead of '# pylint: disable=C0103' for a testcase method name which pylint believes is too long, we could override the regex it is using to permit longer names.

I'd also suggest that we add a new tox environment, e.g., 'tox -e lint', which runs all the hygeine checkers we want (pep8, pylint, etc.) using our defined rules, and fails (to cause PRs to be flagged).

@dhermes
Copy link
Contributor Author

dhermes commented Oct 3, 2014

I am a big fan of a custom pylintrc file, and I think we can cover 99% of things with one. However, there is a caveat.

I don't think we will be able to avoid using pylint: disable comments without tearing our hair out every time we come across some sharp corner we hadn't thought of.

I had never thought of the comments as a nuisance (they are everywhere in Google's codebase and many others) and the pylint people intend for them to be used in that fashion.

Yes, #178 is in place (partly) with such a new tox rule in mind.

@tseaver
Copy link
Contributor

tseaver commented Oct 3, 2014

Those comments smell to me: tools should serve the developers and their code, not the other way 'round.

@dhermes dhermes force-pushed the pylint-gcloud-dir branch 2 times, most recently from 316a825 to 7591229 Compare October 3, 2014 00:29
@dhermes
Copy link
Contributor Author

dhermes commented Oct 3, 2014

Yeah I like the idea, it's just new to me.

Let's see how far we can take it with a pylintrc. The first few things that come to mind:

  • In tests, turn off invalid-name (C0103), protected-access, too-many-public-methods (R0904), too-few-public-methods, and missing-docstring
  • Don't check __init__.py when it is mostly empty

In 7e98f53 I got rid of a few of the pylint disable statements already and will keep working on this.

@silvolu
Copy link
Contributor

silvolu commented Oct 7, 2014

Can I merge this one or is it either this one or #221?

@dhermes
Copy link
Contributor Author

dhermes commented Oct 7, 2014

This one will likely be abandoned since we're trying to minimize the number of pylint: disable comments in our code (prefer to attain the minimum of 0). However I want to get #217 in before anything else code-quality related.

@tseaver
Copy link
Contributor

tseaver commented Oct 7, 2014

I just merged #217.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 7, 2014

Let's finish any discussion on #221 and then I can ask for another look here pending those results.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 7, 2014

Closing this so people don't think it should be merged. Will re-open if need be after #221.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 13, 2014

This is officially dead (won't be re-opened after #221) due to #238

FWIW all these are in #238.

@dhermes dhermes deleted the pylint-gcloud-dir branch October 18, 2014 01:39
@dhermes dhermes mentioned this pull request Feb 4, 2015
urshala pushed a commit to urshala/google-cloud-python that referenced this pull request Jan 17, 2020
Ability to create, and edit listitems in sharepoint
atulep pushed a commit that referenced this pull request Apr 3, 2023
…versions (#210)

Expand pins on library dependencies in preparation for these dependencies taking a new major version. See #10565.
atulep pushed a commit that referenced this pull request Apr 6, 2023
…versions (#210)

Expand pins on library dependencies in preparation for these dependencies taking a new major version. See #10565.
atulep pushed a commit that referenced this pull request Apr 6, 2023
…versions (#210)

Expand pins on library dependencies in preparation for these dependencies taking a new major version. See #10565.
parthea added a commit that referenced this pull request Jul 6, 2023
…210)

* chore: add default_version and codeowner_team to .repo-metadata.json

* update default_version
parthea pushed a commit that referenced this pull request Aug 15, 2023
Source-Link: googleapis/synthtool@c5026b3
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 14, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 20, 2023
* fix: fix type in docstring for map fields

PiperOrigin-RevId: 440107808

Source-Link: googleapis/googleapis@258ddb2

Source-Link: googleapis/googleapis-gen@df0d09a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGYwZDA5YTJjMzZmZjViYWY5ODY0OGVlZmU1MDI5YzE3MzkwNWQwYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md


PiperOrigin-RevId: 440123036

Source-Link: googleapis/googleapis@bc99550

Source-Link: googleapis/googleapis-gen@a0e1d65
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTBlMWQ2NTE1MTI4NzIyYzhjMTYyMTM4N2VhYjM3ODE4NjEyMjc5OCJ9

* 🦉 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>
parthea pushed a commit that referenced this pull request Sep 20, 2023
…210)

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>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Source-Link: googleapis/synthtool@52e4e46
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:6186535cbdbf6b9fe61f00294929221d060634dae4a0795c1cefdbc995b2d605
parthea pushed a commit that referenced this pull request Sep 22, 2023
Source-Link: googleapis/synthtool@4760d8d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
parthea pushed a commit that referenced this pull request Sep 22, 2023
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:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-videointelligence/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #178🦕
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: https://github.com/googleapis/synthtool/commit/25083af347468dd5f90f69627420f7d452b6c50e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e6cbd61f1838d9ff6a31436dfc13717f372a7482a82fc1863ca954ec47bff8c8
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@b0eb8a8
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:df50e8d462f86d6bcb42f27ecad55bb12c404f1c65de9c6fe4c4d25120080bd6
parthea pushed a commit that referenced this pull request Oct 21, 2023
)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-texttospeech](https://github.com/googleapis/python-texttospeech) | `==2.5.0` -> `==2.5.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-texttospeech/2.5.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-texttospeech/2.5.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-texttospeech/2.5.1/compatibility-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-texttospeech/2.5.1/confidence-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-texttospeech</summary>

### [`v2.5.1`](https://github.com/googleapis/python-texttospeech/blob/master/CHANGELOG.md#&#8203;251-httpswwwgithubcomgoogleapispython-texttospeechcomparev250v251-2021-07-20)

[Compare Source](https://github.com/googleapis/python-texttospeech/compare/v2.5.0...v2.5.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).
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@52e4e46
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:6186535cbdbf6b9fe61f00294929221d060634dae4a0795c1cefdbc995b2d605
parthea pushed a commit that referenced this pull request Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Oct 21, 2023
parthea pushed a commit that referenced this pull request Oct 22, 2023
…pprove] (#210)

Source-Link: https://github.com/googleapis/synthtool/commit/e3a1277ac35fc88c09db1930533e24292b132ced
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:452901c74a22f9b9a3bd02bce780b8e8805c97270d424684bff809ce5be8c2a2
parthea pushed a commit that referenced this pull request Oct 22, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472772457

Source-Link: googleapis/googleapis@855b74d

Source-Link: googleapis/googleapis-gen@b64b1e7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9
parthea pushed a commit that referenced this pull request Oct 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 22, 2023
…210)

Source-Link: https://github.com/googleapis/synthtool/commit/395d53adeeacfca00b73abf197f65f3c17c8f1e9
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6c1cbc75c74b8bdd71dada2fa1677e9d6d78a889e9a70ee75b93d1d0543f96e1
parthea pushed a commit that referenced this pull request Oct 22, 2023
…versions (#210)

Expand pins on library dependencies in preparation for these dependencies taking a new major version. See #10565.
parthea pushed a commit that referenced this pull request Oct 22, 2023
Source-Link: googleapis/synthtool@eb78c98
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants