From 2f948cfbb484241178fa7e8c7abd8b0c40a9db24 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 15 Aug 2020 18:17:35 +0200 Subject: cleanup handling: add parameter allow string cleanup be called directly --- fuzzycat/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fuzzycat/utils.py') diff --git a/fuzzycat/utils.py b/fuzzycat/utils.py index 97125ce..ab693eb 100644 --- a/fuzzycat/utils.py +++ b/fuzzycat/utils.py @@ -44,6 +44,9 @@ class StringPipeline: def __init__(self, fs: List[Callable[[str], str]]): self.fs = fs + def __call__(self, s: str) -> str: + return self.run(s) + def run(self, s: str) -> str: """ Apply all function and return result. -- cgit v1.2.3