aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat/utils.py
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-08-15 18:17:35 +0200
committerMartin Czygan <martin.czygan@gmail.com>2020-08-15 18:17:35 +0200
commit2f948cfbb484241178fa7e8c7abd8b0c40a9db24 (patch)
tree5184838a7daba6e54333dacde4d3afeac0384b28 /fuzzycat/utils.py
parent15b4c403141e9477fb9c6c89f6ad4d27c6207a43 (diff)
downloadfuzzycat-2f948cfbb484241178fa7e8c7abd8b0c40a9db24.tar.gz
fuzzycat-2f948cfbb484241178fa7e8c7abd8b0c40a9db24.zip
cleanup handling: add parameter
allow string cleanup be called directly
Diffstat (limited to 'fuzzycat/utils.py')
-rw-r--r--fuzzycat/utils.py3
1 files changed, 3 insertions, 0 deletions
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.