Unverified Commit 2402b140 authored by Georgios Eleftheriou's avatar Georgios Eleftheriou Committed by GitHub
Browse files

Fix python SyntaxWarnings in check-all output (#72538)

By converting the offending strings to raw string literals.
parent 12bdbe27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ class Generator(object):

    def GeneratePrologue(self):

        self.implementationContent += """
        self.implementationContent += r"""
/*===- Generated file -------------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* Introspection of available AST node SourceLocations                        *|
+3 −3
Original line number Diff line number Diff line
@@ -800,7 +800,7 @@ for postfix in ["2", "1", ""]:
        config.substitutions.append(
            (
                "%ld_flags_rpath_exe" + postfix,
                "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
                r"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
                + postfix,
            )
        )
@@ -809,7 +809,7 @@ for postfix in ["2", "1", ""]:
        config.substitutions.append(
            (
                "%ld_flags_rpath_exe" + postfix,
                "-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
                r"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
            )
        )
        config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))
@@ -817,7 +817,7 @@ for postfix in ["2", "1", ""]:
        config.substitutions.append(
            (
                "%ld_flags_rpath_exe" + postfix,
                "-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
                r"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
            )
        )
        config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ def ptxas_version(ptxas):
    ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
    ptxas_out = ptxas_cmd.stdout.read().decode("ascii")
    ptxas_cmd.wait()
    match = re.search("release (\d+)\.(\d+)", ptxas_out)
    match = re.search(r"release (\d+)\.(\d+)", ptxas_out)
    if match:
        return (int(match.group(1)), int(match.group(2)))
    print("couldn't determine ptxas version")