CI: install black for python format checker (#21858)

This commit is contained in:
Jackson Oursland
2025-06-09 10:51:59 -07:00
committed by GitHub
parent fec8d924fe
commit 12b4610b49

View File

@@ -40,9 +40,7 @@ def parse_black_output(output: str) -> Tuple[int, int]:
return black_reformats, black_fails
def generate_markdown_report(
black_reformats: int, black_fails: int, log_file: str
) -> str:
def generate_markdown_report(black_reformats: int, black_fails: int, log_file: str) -> str:
"""Generate a Markdown report section based on Black results and log file."""
report_lines = []
if black_reformats > 0 or black_fails > 0:
@@ -72,6 +70,9 @@ def main():
args = parser.parse_args()
init_environment(args)
logging.info("Installing black (if needed)...")
run_command(["pipx", "install", "-q", "black"], check=True)
cmd = [
"black",
"--line-length",