From 181aeca62198530d2ced9d78eb82760833e7948a Mon Sep 17 00:00:00 2001 From: Sakari Ikonen <64256562+saikonen@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:32:51 +0200 Subject: [PATCH] change regex patterns to raw strings (#1645) --- metaflow/plugins/airflow/airflow_cli.py | 2 +- metaflow/plugins/argo/argo_workflows_cli.py | 2 +- metaflow/plugins/aws/step_functions/step_functions_cli.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metaflow/plugins/airflow/airflow_cli.py b/metaflow/plugins/airflow/airflow_cli.py index 55cedb1fcc..7c4c330e03 100644 --- a/metaflow/plugins/airflow/airflow_cli.py +++ b/metaflow/plugins/airflow/airflow_cli.py @@ -24,7 +24,7 @@ class IncorrectProductionToken(MetaflowException): headline = "Incorrect production token" -VALID_NAME = re.compile("[^a-zA-Z0-9_\-\.]") +VALID_NAME = re.compile(r"[^a-zA-Z0-9_\-\.]") def resolve_token( diff --git a/metaflow/plugins/argo/argo_workflows_cli.py b/metaflow/plugins/argo/argo_workflows_cli.py index c86e2381df..38aa9065c8 100644 --- a/metaflow/plugins/argo/argo_workflows_cli.py +++ b/metaflow/plugins/argo/argo_workflows_cli.py @@ -29,7 +29,7 @@ from .argo_workflows import ArgoWorkflows -VALID_NAME = re.compile("^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$") +VALID_NAME = re.compile(r"^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$") class IncorrectProductionToken(MetaflowException): diff --git a/metaflow/plugins/aws/step_functions/step_functions_cli.py b/metaflow/plugins/aws/step_functions/step_functions_cli.py index 1d657c1277..63b1b64542 100644 --- a/metaflow/plugins/aws/step_functions/step_functions_cli.py +++ b/metaflow/plugins/aws/step_functions/step_functions_cli.py @@ -19,7 +19,7 @@ from .step_functions import StepFunctions from .production_token import load_token, store_token, new_token -VALID_NAME = re.compile("[^a-zA-Z0-9_\-\.]") +VALID_NAME = re.compile(r"[^a-zA-Z0-9_\-\.]") class IncorrectProductionToken(MetaflowException):