From 41ee2edc975a8e276066644ba0c8cfcf556423ad Mon Sep 17 00:00:00 2001 From: mishaschwartz <4380924+mishaschwartz@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:13:33 -0400 Subject: [PATCH] backport syntax for python < 3.12 (again) --- tests/test_cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index e51e04c..e591ed8 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -15,7 +15,8 @@ def run_cli(*args: str, **kwargs: Mapping) -> subprocess.CompletedProcess: @pytest.fixture(scope="session") def populator_help_pattern(): - return re.compile(f"{{({',?|'.join([imp.replace('.', '\\.') for imp in implementations.__all__])},?)+}}") + name_options = ',?|'.join([imp.replace('.', '\\.') for imp in implementations.__all__]) + return re.compile(f"{{({name_options},?)+}}") def test_help():