| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request adds an import checking step using Ruff (ruff check --select I) to various noxfile.py configurations, templates, and integration goldens across multiple packages. It also includes a minor import reordering in a Bigtable unit test file. There are no review comments, so no feedback is provided.
Sorry, something went wrong.
|
There is a diff when running code generation for google-cloud-spanner. I didn't check all packages. Please can you run generation for all the packages that were changed so there is no diff? (py3142) partheniou@partheniou-vm-3:~/google-cloud-python-20260818$ git diff
diff --git a/packages/google-cloud-spanner/noxfile.py b/packages/google-cloud-spanner/noxfile.py
index d0a3573f350..c1571f20636 100644
--- a/packages/google-cloud-spanner/noxfile.py
+++ b/packages/google-cloud-spanner/noxfile.py
@@ -103,6 +103,17 @@ def lint(session):
"""
session.install("flake8", RUFF_VERSION)
+ # 1. Check imports
+ session.run(
+ "ruff",
+ "check",
+ "--select",
+ "I",
+ f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
+ "--line-length=88",
+ *LINT_PATHS,
+ )
+
# 2. Check formatting
session.run(
"ruff",
|
Sorry, something went wrong.
|
I'm going to switch this to draft but please mark it ready for review once the generated code has been updated |
Sorry, something went wrong.
There was a problem hiding this comment.
Revert the changes to .librarian/generator-input/client-post-processing/bigtable-integration.yaml and .librarian/generator-input/client-post-processing/spanner-integration.yaml since code generation will happen in a future PR
Sorry, something went wrong.
I reverted them for now. But does this mean we'll have to come back and finish this after the next generation? Could we also apply the generated changes for these libraries early here, and prevent the diff that way? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In #18129 it was revealed that lint doesn't check import orderings, but format does. This can result in an issue where code passes the checker, but later fails consistency checks, after running through the formatter
This PR adds an extra step to lint to verify import ordering
Changes will roll out to generated libraries after the next generation cycle