use 'util.re()' in more places

continuation of b5c88b3d3e
This commit is contained in:
Mike Fährmann
2025-06-23 20:27:40 +02:00
parent c08833aed9
commit 434bf3b1f3
5 changed files with 10 additions and 17 deletions

View File

@@ -9,7 +9,6 @@
"""Filesystem path handling"""
import os
import re
import shutil
import functools
from . import util, formatter, exception
@@ -148,8 +147,7 @@ class PathFormat():
def func(x, c=chars, r=repl):
return x.replace(c, r)
else:
return functools.partial(
re.compile("[" + chars + "]").sub, repl)
return functools.partial(util.re(f"[{chars}]").sub, repl)
return func
def _process_repl_dict(self, chars):