Ruff format
This commit is contained in:
+12
-1
@@ -50,7 +50,18 @@ def ruff_format_content(content: str, target_path: Path) -> str:
|
|||||||
temp_file.write_text(content, "UTF-8", newline="\n")
|
temp_file.write_text(content, "UTF-8", newline="\n")
|
||||||
# Sort imports first
|
# Sort imports first
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["uv", "run", "--with", "ruff", "ruff", "check", "--select", "I", "--fix", str(temp_file)],
|
[
|
||||||
|
"uv",
|
||||||
|
"run",
|
||||||
|
"--with",
|
||||||
|
"ruff",
|
||||||
|
"ruff",
|
||||||
|
"check",
|
||||||
|
"--select",
|
||||||
|
"I",
|
||||||
|
"--fix",
|
||||||
|
str(temp_file),
|
||||||
|
],
|
||||||
cwd=target_path.parent,
|
cwd=target_path.parent,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ def main():
|
|||||||
epilog=HELP_EPILOG,
|
epilog=HELP_EPILOG,
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-l", "--listen",
|
"-l",
|
||||||
|
"--listen",
|
||||||
metavar="host:port",
|
metavar="host:port",
|
||||||
help=f"Vite (default: localhost:{DEFAULT_VITE_PORT})",
|
help=f"Vite (default: localhost:{DEFAULT_VITE_PORT})",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user