diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/cuda.py | 4 | ||||
-rw-r--r-- | mesonbuild/mcompile.py | 2 | ||||
-rw-r--r-- | mesonbuild/scripts/depscan.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index bbe6e95..733e362 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -186,7 +186,7 @@ class CudaCompiler(Compiler): @classmethod def _shield_nvcc_list_arg(cls, arg: str, listmode: bool=True) -> str: - """ + r""" Shield an argument against both splitting by NVCC's list-argument parse logic, and interpretation by any shell. @@ -256,7 +256,7 @@ class CudaCompiler(Compiler): # Shield individual strings, without listmode, then return them with # escaped commas between them. l = [cls._shield_nvcc_list_arg(s, listmode=False) for s in l] - return '\,'.join(l) + return r'\,'.join(l) @classmethod def _to_host_flags(cls, flags: T.List[str], phase: _Phase = _Phase.COMPILER) -> T.List[str]: diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index ba1d3cf..b7653d2 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -175,7 +175,7 @@ def generate_target_name_vs(target: ParsedTargetName, builddir: Path, introspect # Normalize project name # Source: https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-build-specific-targets-in-solutions-by-using-msbuild-exe - target_name = re.sub('[\%\$\@\;\.\(\)\']', '_', intro_target['id']) # type: str + target_name = re.sub(r"[\%\$\@\;\.\(\)']", '_', intro_target['id']) # type: str rel_path = Path(intro_target['filename'][0]).relative_to(builddir.resolve()).parent if rel_path != Path('.'): target_name = str(rel_path / target_name) diff --git a/mesonbuild/scripts/depscan.py b/mesonbuild/scripts/depscan.py index c85f8e7..2879d8b 100644 --- a/mesonbuild/scripts/depscan.py +++ b/mesonbuild/scripts/depscan.py @@ -22,8 +22,8 @@ import typing as T from ..backend.ninjabackend import TargetDependencyScannerInfo, ninja_quote from ..compilers.compilers import lang_suffixes -CPP_IMPORT_RE = re.compile('\w*import ([a-zA-Z0-9]+);') -CPP_EXPORT_RE = re.compile('\w*export module ([a-zA-Z0-9]+);') +CPP_IMPORT_RE = re.compile(r'\w*import ([a-zA-Z0-9]+);') +CPP_EXPORT_RE = re.compile(r'\w*export module ([a-zA-Z0-9]+);') FORTRAN_INCLUDE_PAT = r"^\s*include\s*['\"](\w+\.\w+)['\"]" FORTRAN_MODULE_PAT = r"^\s*\bmodule\b\s+(\w+)\s*(?:!+.*)*$" |