From 0b92f86408730a9a8abb73df8e433a0dccfe2312 Mon Sep 17 00:00:00 2001 From: Kevin James Date: Fri, 20 Sep 2024 17:24:30 +0100 Subject: [PATCH] refactor: fix invalid escape sequences (#11147) Signed-off-by: Kevin James --- .pre-commit-config.yaml | 6 ++++++ backend/src/apiserver/visualization/types/tfdv.py | 2 +- components/aws/athena/query/src/query.py | 2 +- .../container/v1/aiplatform/remote_runner.py | 2 +- .../v1/hyperparameter_tuning_job/component.py | 2 +- proxy/get_proxy_url.py | 4 ++-- sdk/python/kfp/compiler/compiler_test.py | 12 ++++++------ .../compiler/v2_compatible_compiler_test.py | 6 +++--- .../deprecated/components/type_annotation_utils.py | 2 +- .../deprecated/components_tests/test_python_op.py | 2 +- sdk/python/kfp/deprecated/dsl/_ops_group.py | 2 +- sdk/python/kfp/dsl/executor.py | 2 +- sdk/python/kfp/dsl/for_loop.py | 4 ++-- sdk/python/kfp/dsl/placeholders_test.py | 14 +++++++------- sdk/python/kfp/dsl/tasks_group_test.py | 2 +- sdk/python/kfp/dsl/types/type_annotations.py | 2 +- sdk/python/kfp/local/config_test.py | 2 +- test/sample-test/sample_test_launcher.py | 8 ++++---- test/sample-test/unittests/utils_tests.py | 10 +++++----- 19 files changed, 46 insertions(+), 40 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49e5c41120d..5e6a0f02599 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,12 @@ repos: - id: double-quote-string-fixer - id: no-commit-to-branch args: [--branch, master] + - repo: https://github.com/PyCQA/flake8 + rev: 7.1.1 + hooks: + - id: flake8 + args: + - --select=W605 # required formatting jobs (run these last) # add comment "noqa" to ignore an import that should not be removed diff --git a/backend/src/apiserver/visualization/types/tfdv.py b/backend/src/apiserver/visualization/types/tfdv.py index c8abfa849c3..262dc98a137 100644 --- a/backend/src/apiserver/visualization/types/tfdv.py +++ b/backend/src/apiserver/visualization/types/tfdv.py @@ -72,7 +72,7 @@ def get_statistics_html( # facets element and then remove it once we have appended the serialized proto # string to the element. We do this to avoid any collision of ids when # displaying multiple facets output in the notebook. - html_template = """ + html_template = r"""