From d36064bff77148bf4c7fad09fc4237c3ca6479f7 Mon Sep 17 00:00:00 2001 From: Silas Kraume Date: Tue, 13 Feb 2024 02:06:36 +0100 Subject: [PATCH] stringinder better constructor --- cat_win/util/stringfinder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cat_win/util/stringfinder.py b/cat_win/util/stringfinder.py index 7fbf448b..0cb1609d 100644 --- a/cat_win/util/stringfinder.py +++ b/cat_win/util/stringfinder.py @@ -11,9 +11,9 @@ class StringFinder: """ defines a stringfinder """ - def __init__(self, literals: set, regex: set) -> None: - self.kw_literals = literals - self.kw_regex = regex + def __init__(self, literals: set = None, regex: set = None) -> None: + self.kw_literals = literals if literals is not None else {} + self.kw_regex = regex if regex is not None else {} def _findliterals(self, sub: str, _s: str): """