mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Autofix both black and isort
This commit is contained in:
parent
d396ec3310
commit
bed8a9ae07
@ -214,13 +214,13 @@ def main():
|
|||||||
state, description, test_results, additional_files = process_result(temp_path)
|
state, description, test_results, additional_files = process_result(temp_path)
|
||||||
|
|
||||||
autofix_description = ""
|
autofix_description = ""
|
||||||
fail_cnt = 0
|
push_fix = args.push
|
||||||
for result in test_results:
|
for result in test_results:
|
||||||
if result.status in (FAILURE, FAIL):
|
if result.status in (FAILURE, FAIL) and push_fix:
|
||||||
# do not autofix if not only black failed
|
# do not autofix if something besides isort and black is failed
|
||||||
fail_cnt += 1
|
push_fix = any(result.name.endswith(check) for check in ("isort", "black"))
|
||||||
|
|
||||||
if args.push and fail_cnt == 1:
|
if push_fix:
|
||||||
try:
|
try:
|
||||||
commit_push_staged(pr_info)
|
commit_push_staged(pr_info)
|
||||||
except subprocess.SubprocessError:
|
except subprocess.SubprocessError:
|
||||||
|
Loading…
Reference in New Issue
Block a user