Removed pattern typing for compatibility

This commit is contained in:
Soxoj
2021-02-15 01:45:29 +03:00
parent c0956a0e23
commit 89c33e5409
+2 -1
View File
@@ -1,4 +1,5 @@
import re import re
import sys
class CaseConverter: class CaseConverter:
@@ -45,7 +46,7 @@ class URLMatcher:
return '' return ''
@classmethod @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) url_main_part = self.extract_main_part(url)
for c in self.UNSAFE_SYMBOLS: for c in self.UNSAFE_SYMBOLS:
url_main_part = url_main_part.replace(c, f'\\{c}') url_main_part = url_main_part.replace(c, f'\\{c}')