Follow idiomatic Python coding style (#9763)
This commit is contained in:
parent
ae2e780338
commit
57d8fa0b72
@ -102,8 +102,8 @@ def analyze_files(commits_and_tags, dry_run=False):
|
|||||||
"*.js",
|
"*.js",
|
||||||
]
|
]
|
||||||
|
|
||||||
runningInCI = os.environ.get("CI", "false") == "true"
|
is_ci = "CI" in os.environ
|
||||||
if runningInCI:
|
if is_ci:
|
||||||
print("<details><summary>Detailed output</summary>\n\n")
|
print("<details><summary>Detailed output</summary>\n\n")
|
||||||
with subprocess.Popen(cmd, stdout=subprocess.PIPE) as proc:
|
with subprocess.Popen(cmd, stdout=subprocess.PIPE) as proc:
|
||||||
for line in io.TextIOWrapper(proc.stdout):
|
for line in io.TextIOWrapper(proc.stdout):
|
||||||
@ -113,7 +113,7 @@ def analyze_files(commits_and_tags, dry_run=False):
|
|||||||
if retcode:
|
if retcode:
|
||||||
raise subprocess.CalledProcessError(retcode, cmd)
|
raise subprocess.CalledProcessError(retcode, cmd)
|
||||||
print()
|
print()
|
||||||
if runningInCI:
|
if is_ci:
|
||||||
print("</details>\n")
|
print("</details>\n")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user