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

Add Black. Template noxfile + flake8. #6642

Merged
merged 26 commits into from
Nov 28, 2018
Merged

Conversation

crwilcox
Copy link
Contributor

  • Add Templating support to existing synth.py
  • Refactor Synth scripts to have similar style
  • Add black target and coverage to all synth.py

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 22, 2018
@tswast
Copy link
Contributor

tswast commented Nov 26, 2018

Cool! A bit difficult to review, though. Which files are the hand-edited ones?

@crwilcox
Copy link
Contributor Author

:) I tried to make it not too bad. the hand edited files are synth.py. There is some other hand-editing to mirror generation.
At a high-level

  • get templates from synth now (noxfile, coveragerc, flake8)
  • for each library tweak coverage numbers to match what is seen. This is still in progress but the only things that will change is the int for coverage.

@crwilcox
Copy link
Contributor Author

I should also note, some lint may fail right now. I am waiting until people have reviewed this to actually blacken (to avoid random noise in review)

asset/synth.py Outdated
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
templated_files = gcp.CommonTemplates().py_library(unit_cov_level=86, cov_level=85)

This comment was marked as spam.

This comment was marked as spam.

@@ -11,3 +11,6 @@ exclude_lines =
def __repr__
# Ignore abstract methods
raise NotImplementedError
omit =
*/gapic/*.py

This comment was marked as spam.

This comment was marked as spam.

@@ -1,4 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503

This comment was marked as spam.

This comment was marked as spam.

@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 27, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 27, 2018
@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 27, 2018
@crwilcox crwilcox deleted the templating branch November 28, 2018 21:55
erikwebb pushed a commit to erikwebb/google-cloud-python that referenced this pull request Dec 3, 2018
chrisrossi pushed a commit to chrisrossi/google-cloud-python that referenced this pull request Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants