From 3ba7808035f42552a32e599c02a139e61cf6811b Mon Sep 17 00:00:00 2001 From: Amy Wu Date: Tue, 1 Aug 2023 09:27:32 -0700 Subject: [PATCH 1/2] Update noxfile.py.j2 Pinned flake8 to the latest version (as of Aug2023) to avoid unexpected lint error after version update. --- synthtool/gcp/templates/python_library/noxfile.py.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synthtool/gcp/templates/python_library/noxfile.py.j2 b/synthtool/gcp/templates/python_library/noxfile.py.j2 index e565077c6..40651e382 100644 --- a/synthtool/gcp/templates/python_library/noxfile.py.j2 +++ b/synthtool/gcp/templates/python_library/noxfile.py.j2 @@ -25,6 +25,7 @@ import warnings import nox +FLAKE8_VERSION = "flake8==6.1.0" BLACK_VERSION = "black==22.3.0" ISORT_VERSION = "isort==5.10.1" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -149,7 +150,7 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION) + session.install(FLAKE8_VERSION, BLACK_VERSION) session.run( "black", "--check", From 1de7e9c5e08869764c0542584523004c6c5ce047 Mon Sep 17 00:00:00 2001 From: Amy Wu Date: Tue, 1 Aug 2023 09:28:21 -0700 Subject: [PATCH 2/2] Update .pre-commit-config.yaml --- synthtool/gcp/templates/python_library/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthtool/gcp/templates/python_library/.pre-commit-config.yaml b/synthtool/gcp/templates/python_library/.pre-commit-config.yaml index 9e3898fd1..19409cbd3 100644 --- a/synthtool/gcp/templates/python_library/.pre-commit-config.yaml +++ b/synthtool/gcp/templates/python_library/.pre-commit-config.yaml @@ -26,6 +26,6 @@ repos: hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 6.1.0 hooks: - id: flake8