diff options
author | morpheus65535 <[email protected]> | 2024-09-22 12:53:24 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-09-22 12:54:06 -0400 |
commit | 14a361dd97bb89204c748f60ef6052544d992dac (patch) | |
tree | 97513c57903d48aa0b429cca941a974ff49bc416 | |
parent | 115926d44068bf0302ad9a8e9795554a53c7b3f1 (diff) | |
download | bazarr-14a361dd97bb89204c748f60ef6052544d992dac.tar.gz bazarr-14a361dd97bb89204c748f60ef6052544d992dac.zip |
Fixed SyntaxWarning in subzero language enforced in Python 3.12. #2656
-rw-r--r-- | custom_libs/subzero/language.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/custom_libs/subzero/language.py b/custom_libs/subzero/language.py index 3d556c0e1..99b64211c 100644 --- a/custom_libs/subzero/language.py +++ b/custom_libs/subzero/language.py @@ -162,14 +162,4 @@ class Language(Language_): return Language(*Language_.fromalpha3b(s).__getstate__()) -IETF_MATCH = ".+\.([^-.]+)(?:-[A-Za-z]+)?$" -ENDSWITH_LANGUAGECODE_RE = re.compile("\.([^-.]{2,3})(?:-[A-Za-z]{2,})?$") - - -def match_ietf_language(s, ietf=False): - language_match = re.match(".+\.([^\.]+)$" if not ietf - else IETF_MATCH, s) - if language_match and len(language_match.groups()) == 1: - language = language_match.groups()[0] - return language - return s +ENDSWITH_LANGUAGECODE_RE = re.compile(r"\.([^-.]{2,3})(?:-[A-Za-z]{2,})?$") |