From c901f3eb1acf78fd4933d8faeedc517ccafe627e Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 27 Jan 2022 12:09:50 -0800 Subject: Started using flake8 to lint; removed some of its warnings. --- profanity_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profanity_filter.py') diff --git a/profanity_filter.py b/profanity_filter.py index 4723a2d..22de263 100755 --- a/profanity_filter.py +++ b/profanity_filter.py @@ -499,7 +499,7 @@ class ProfanityFilter(object): def tokenize(self, text: str): for x in nltk.word_tokenize(text): - for y in re.split('\W+', x): + for y in re.split(r'\W+', x): yield y def contains_bad_word(self, text: str) -> bool: -- cgit v1.3