Skip to content

Commit b3500e5

Browse files
committed
Fix some regex syntax warnings
1 parent 041cb88 commit b3500e5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

msg2po/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def get_enc(lang_path: str = "", file_path: str = ""):
231231
if filename in UTF_FILENAMES:
232232
encoding = "utf-8"
233233

234-
utf_name = re.compile(".*_ee\.tra$")
234+
utf_name = re.compile(r".*_ee\.tra$")
235235
if utf_name.match(filename):
236236
encoding = "utf-8"
237237

msg2po/dir2msgstr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def dir2msgstr(src_dir: str, po: POFile, po_path: str = "", overwrite: bool = Tr
6262
for dir_name, subdir_list, file_list in os.walk(".", topdown=False, followlinks=True):
6363
for file_name in file_list:
6464
full_name = os.path.join(dir_name, file_name)
65-
full_name = re.sub("^\./", "", full_name) # remove trailing './'
65+
full_name = re.sub(r"^\./", "", full_name) # remove trailing './'
6666
fext = get_ext(file_name)
6767
if fext != extension:
6868
continue

0 commit comments

Comments
 (0)