Skip to content

Commit

Permalink
ruff formatte
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Nov 14, 2023
1 parent b054006 commit 2ba956b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion utils/check_static_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def check_static_imports(update: bool) -> NoReturn:
reordered_content_before_static_checks + IF_TYPE_CHECKING_LINE + "\n".join(static_imports) + "\n"
)
ruff_bin = find_ruff_bin()
os.spawnv(os.P_WAIT, ruff_bin, ["ruff", "format", str(filepath), "--quiet"])
os.spawnv(os.P_WAIT, ruff_bin, ["ruff", str(filepath), "--fix", "--quiet"])
os.spawnv(os.P_WAIT, ruff_bin, ["ruff", "format", str(filepath), "--quiet"])
expected_init_content = filepath.read_text()

# If expected `__init__.py` content is different, test fails. If '--update-init-file'
Expand Down
1 change: 1 addition & 0 deletions utils/generate_async_inference_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def format_source_code(code: str) -> str:
filepath.write_text(code)
ruff_bin = find_ruff_bin()
os.spawnv(os.P_WAIT, ruff_bin, ["ruff", str(filepath), "--fix", "--quiet"])
os.spawnv(os.P_WAIT, ruff_bin, ["ruff", "format", str(filepath), "--quiet"])
return filepath.read_text()


Expand Down

0 comments on commit 2ba956b

Please sign in to comment.