From 8cc861b6b1af2c95ad0f26d02a03f36202971c93 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Wed, 5 Mar 2025 16:34:27 +0100 Subject: [PATCH] Don't add multiple dots at end of line --- standardize_test_format/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/standardize_test_format/__init__.py b/standardize_test_format/__init__.py index e1c1175..c7181a4 100644 --- a/standardize_test_format/__init__.py +++ b/standardize_test_format/__init__.py @@ -64,7 +64,8 @@ TEST_PATTERN: re.Pattern = re.compile( re.IGNORECASE, ) -END_SYMBOLS = '.?!' +END_SYMBOLS_SET = ('.','?','!') +END_SYMBOLS = ''.join(END_SYMBOLS_SET) IGNORABLE_WORDS_IN_NAME = frozenset( { @@ -97,7 +98,7 @@ def format_test_prefix( if with_javadoc: str_builder += ['/** '] str_builder += [description] - if not description.endswith(END_SYMBOLS): + if not description.endswith(END_SYMBOLS_SET): str_builder += ['.'] str_builder += [' */', '\n']