diff options
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | 2019-07-14 11:15:36 +1000 |
---|---|---|
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | 2019-07-14 11:15:36 +1000 |
commit | c4ad3480bdae23239d7feeaa10e8755133ff20b4 (patch) | |
tree | b56a16d56cd81f6d089567b2f0c9aca9137e8ade | |
parent | c20b6f5b0eb29f6cd44c8540d3f41c152c0c86b1 (diff) | |
download | swig-c4ad3480bdae23239d7feeaa10e8755133ff20b4.tar.gz |
Tools: Unify string quoting in the Python sources
-rwxr-xr-x | Tools/obs-buildlogs.py | 4 | ||||
-rwxr-xr-x | Tools/testflags.py | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Tools/obs-buildlogs.py b/Tools/obs-buildlogs.py index b97e7dba1..1c77e80c4 100755 --- a/Tools/obs-buildlogs.py +++ b/Tools/obs-buildlogs.py @@ -11,9 +11,9 @@ def remove_old_files(): os.remove(file) def download(): - repos = subprocess.Popen(['osc', 'repositories'], stdout=subprocess.PIPE) + repos = subprocess.Popen(["osc", "repositories"], stdout=subprocess.PIPE) for line in repos.stdout: - command = ['osc', 'buildlog', '--last'] + line.split() + command = ["osc", "buildlog", "--last"] + line.split() filename = "-".join(line.split()) + ".log" print("Downloading logs using: {}".format(" ".join(command))) buildlog = subprocess.Popen(command, stdout=subprocess.PIPE) diff --git a/Tools/testflags.py b/Tools/testflags.py index bf85f5680..f3d216b59 100755 --- a/Tools/testflags.py +++ b/Tools/testflags.py @@ -23,7 +23,7 @@ def get_cflags(language, std, compiler): "scilab":"-Werror " + c_common, "tcl":"-Werror " + c_common, } - if compiler == 'clang': + if compiler == "clang": cflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile if language not in cflags: @@ -54,7 +54,7 @@ def get_cxxflags(language, std, compiler): "scilab":"-Werror " + cxx_common, "tcl":"-Werror " + cxx_common, } - if compiler == 'clang': + if compiler == "clang": cxxflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile if language not in cxxflags: @@ -64,12 +64,12 @@ def get_cxxflags(language, std, compiler): import argparse parser = argparse.ArgumentParser(description="Display CFLAGS or CXXFLAGS to use for testing the SWIG examples and test-suite.") -parser.add_argument('-l', '--language', required=True, help='set language to show flags for') +parser.add_argument("-l", "--language", required=True, help="set language to show flags for") flags = parser.add_mutually_exclusive_group(required=True) -flags.add_argument('-c', '--cflags', action='store_true', default=False, help='show CFLAGS') -flags.add_argument('-x', '--cxxflags', action='store_true', default=False, help='show CXXFLAGS') -parser.add_argument('-s', '--std', required=False, help='language standard flags for the -std= option') -parser.add_argument('-C', '--compiler', required=False, help='compiler used (clang or gcc)') +flags.add_argument("-c", "--cflags", action="store_true", default=False, help="show CFLAGS") +flags.add_argument("-x", "--cxxflags", action="store_true", default=False, help="show CXXFLAGS") +parser.add_argument("-s", "--std", required=False, help="language standard flags for the -std= option") +parser.add_argument("-C", "--compiler", required=False, help="compiler used (clang or gcc)") args = parser.parse_args() if args.cflags: |