mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
refactor: use parentheses in print statements in python (#7779)
This commit is contained in:
parent
4c779b5e8c
commit
d96e7226dd
4 changed files with 8 additions and 8 deletions
|
@ -34,12 +34,12 @@ def run_benchmark(deno_exe, method, input_file):
|
|||
(out, _) = p.communicate()
|
||||
|
||||
elapsed = out.split(':')[1].strip()
|
||||
print "[{}] {}".format(alg, elapsed)
|
||||
print("[{}] {}".format(alg, elapsed))
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 4:
|
||||
print "Usage ./tools/hash_benchmark.py path/to/deno method input"
|
||||
print("Usage ./tools/hash_benchmark.py path/to/deno method input")
|
||||
sys.exit(1)
|
||||
|
||||
run_benchmark(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||
|
|
|
@ -113,7 +113,7 @@ def pylint():
|
|||
|
||||
|
||||
def clippy():
|
||||
print "clippy"
|
||||
print("clippy")
|
||||
current_build_mode = build_mode()
|
||||
args = ["cargo", "clippy", "--all-targets", "--locked"]
|
||||
if current_build_mode != "debug":
|
||||
|
|
|
@ -13,8 +13,8 @@ def main():
|
|||
["git", "status", "-uno", "--porcelain", "--ignore-submodules"],
|
||||
exit_on_fail=True)
|
||||
if result.out:
|
||||
print "Run tools/format.py "
|
||||
print result.out
|
||||
print("Run tools/format.py ")
|
||||
print(result.out)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ def run(args, quiet=False, cwd=None, env=None, merge_env=None, shell=None):
|
|||
# - Windows: use shell; this makes .bat/.cmd files work.
|
||||
shell = os.name == "nt"
|
||||
if not quiet:
|
||||
print " ".join([shell_quote(arg) for arg in args])
|
||||
print(" ".join([shell_quote(arg) for arg in args]))
|
||||
rc = subprocess.call(args, cwd=cwd, env=env, shell=shell)
|
||||
if rc != 0:
|
||||
sys.exit(rc)
|
||||
|
@ -77,7 +77,7 @@ def run_output(args,
|
|||
merge_env = {}
|
||||
args[0] = os.path.normpath(args[0])
|
||||
if not quiet:
|
||||
print " ".join(args)
|
||||
print(" ".join(args))
|
||||
env = make_env(env=env, merge_env=merge_env)
|
||||
shell = os.name == "nt" # Run through shell to make .bat/.cmd files work.
|
||||
p = subprocess.Popen(
|
||||
|
@ -412,4 +412,4 @@ def tty_capture(cmd, bytes_input, timeout=5):
|
|||
|
||||
def print_command(cmd, files):
|
||||
noun = "file" if len(files) == 1 else "files"
|
||||
print "%s (%d %s)" % (cmd, len(files), noun)
|
||||
print("%s (%d %s)" % (cmd, len(files), noun))
|
||||
|
|
Loading…
Reference in a new issue