From 0275ec2f22a019d40248716230caa883a0054e8e Mon Sep 17 00:00:00 2001 From: Bocchi <59400127+Bocchi-Chan2023@users.noreply.github.com> Date: Tue, 14 May 2024 14:33:32 +0900 Subject: [PATCH] Properly exclude for tagger to run These tags make the tagger inoperable. Then exclude them. --- tagger/uiset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tagger/uiset.py b/tagger/uiset.py index b921860..85be2d5 100644 --- a/tagger/uiset.py +++ b/tagger/uiset.py @@ -338,6 +338,9 @@ def update_exclude(cls, exclude: str) -> None: return un_re = re_comp(r' exclude(?: and \w+)? tags') cls.err = {err for err in cls.err if not un_re.search(err)} + + exclude = re_sub(r'(\*|\+|\?|\(|\))', r'\\\1', exclude) + for excl in map(str.strip, exclude.split(',')): incompatible = ['add', 'keep', 'search', 'replace'] cls.test_add(excl, 'exclude', incompatible)