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

refactor: blacken samples #766

Closed
wants to merge 3 commits into from

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Jul 14, 2021

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 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 #765 🦕

@tswast tswast requested a review from a team July 14, 2021 20:32
@tswast tswast requested review from a team as code owners July 14, 2021 20:32
@tswast tswast requested review from loferris and crwilcox and removed request for a team July 14, 2021 20:32
@product-auto-label product-auto-label bot added api: bigquery Issues related to the googleapis/python-bigquery API. samples Issues that are directly related to samples. labels Jul 14, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 14, 2021
@tswast tswast added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 14, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 14, 2021
@tswast
Copy link
Contributor Author

tswast commented Jul 14, 2021

I noticed some conflicts with pre-commit and the version of black used in samples sessions. Mailed googleapis/synthtool#1158 to address that.

@plamut
Copy link
Contributor

plamut commented Jul 15, 2021

I noticed some conflicts with pre-commit and the version of black used in samples sessions.

Aha, so that's why the lint check failed, one of the snippets was still re-formatted.

Ignoring that, the PR looks good.

Turns out they were already blackened.
@tswast
Copy link
Contributor Author

tswast commented Jul 15, 2021

Hmm... Turns out these were already being blackened by the root noxfile. Twice, actually, due to docs and samples included here:

BLACK_PATHS = ("docs", "google", "samples", "tests", "noxfile.py", "setup.py")

Since we've still got a mess of files in the root samples/ dir like https://github.com/googleapis/python-bigquery/blob/master/samples/add_empty_column.py

I think it'd be best to wait on this until we do something like #203 (We'll have to do the move in two phases to avoid breaking cloud.google.com links)

@tswast tswast closed this Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blacken samples using templated noxfile
3 participants