Target project no longer depends on httpx but depends on ~matching fastapi-vue version. Ruff cleanup.

This commit is contained in:
2026-08-31 17:07:49 +00:00
parent cb0b1f067d
commit c65d8eaa12
5 changed files with 73 additions and 35 deletions
+7 -3
View File
@@ -1596,12 +1596,16 @@ def cmd_setup(args: argparse.Namespace) -> int:
print("✅ Created .gitignore")
# === Add dependencies using uv ===
# Pin fastapi-vue to the same major.minor as this setup tool (both are released
# from the same tags). Patch/dev releases may deviate, which also keeps this
# resolvable when running a development version of fastapi-vue-setup.
mm = re.match(r"(\d+)\.(\d+)", version)
fastapi_vue_req = f"fastapi-vue~={mm[1]}.{mm[2]}.0" if mm else "fastapi-vue"
if dry:
print("📦 Would add: fastapi[standard], fastapi-vue, httpx (dev only)")
print(f"📦 Would add: fastapi[standard], {fastapi_vue_req}")
else:
print("📦 Dependencies")
uv_add_packages(["fastapi[standard]", "fastapi-vue"], cwd=project_dir)
uv_add_packages(["httpx"], cwd=project_dir, group="dev")
uv_add_packages(["fastapi[standard]", fastapi_vue_req], cwd=project_dir)
print()
print_boxed("Setup complete!")