From 89c33e5409dc8a37310c320f97ac847a483e2ba2 Mon Sep 17 00:00:00 2001 From: Soxoj Date: Mon, 15 Feb 2021 01:45:29 +0300 Subject: [PATCH] Removed pattern typing for compatibility --- maigret/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maigret/utils.py b/maigret/utils.py index f68bdc3..d7125ef 100644 --- a/maigret/utils.py +++ b/maigret/utils.py @@ -1,4 +1,5 @@ import re +import sys class CaseConverter: @@ -45,7 +46,7 @@ class URLMatcher: return '' @classmethod - def make_profile_url_regexp(self, url: str, username_regexp: str = '') -> re.Pattern: + def make_profile_url_regexp(self, url: str, username_regexp: str = ''): url_main_part = self.extract_main_part(url) for c in self.UNSAFE_SYMBOLS: url_main_part = url_main_part.replace(c, f'\\{c}')