mirror of
https://github.com/github/spec-kit.git
synced 2026-03-18 19:33:09 +00:00
fix: address PR check failures (ruff F541, CodeQL URL substring)
- Remove extraneous f-prefix from two f-strings without placeholders - Replace substring URL check in test with startswith/endswith assertions to satisfy CodeQL incomplete URL substring sanitization rule
This commit is contained in:
@@ -2137,7 +2137,7 @@ def preset_info(
|
|||||||
license_val = local_pack.data.get("preset", {}).get("license")
|
license_val = local_pack.data.get("preset", {}).get("license")
|
||||||
if license_val:
|
if license_val:
|
||||||
console.print(f" License: {license_val}")
|
console.print(f" License: {license_val}")
|
||||||
console.print(f"\n [green]Status: installed[/green]")
|
console.print("\n [green]Status: installed[/green]")
|
||||||
console.print()
|
console.print()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -2164,7 +2164,7 @@ def preset_info(
|
|||||||
console.print(f" Repository: {pack_info['repository']}")
|
console.print(f" Repository: {pack_info['repository']}")
|
||||||
if pack_info.get("license"):
|
if pack_info.get("license"):
|
||||||
console.print(f" License: {pack_info['license']}")
|
console.print(f" License: {pack_info['license']}")
|
||||||
console.print(f"\n [yellow]Status: not installed[/yellow]")
|
console.print("\n [yellow]Status: not installed[/yellow]")
|
||||||
console.print(f" Install with: [cyan]specify preset add {pack_id}[/cyan]")
|
console.print(f" Install with: [cyan]specify preset add {pack_id}[/cyan]")
|
||||||
console.print()
|
console.print()
|
||||||
|
|
||||||
|
|||||||
@@ -774,8 +774,8 @@ class TestPresetCatalog:
|
|||||||
def test_default_catalog_url(self, project_dir):
|
def test_default_catalog_url(self, project_dir):
|
||||||
"""Test default catalog URL."""
|
"""Test default catalog URL."""
|
||||||
catalog = PresetCatalog(project_dir)
|
catalog = PresetCatalog(project_dir)
|
||||||
assert "githubusercontent.com" in catalog.DEFAULT_CATALOG_URL
|
assert catalog.DEFAULT_CATALOG_URL.startswith("https://")
|
||||||
assert "presets/catalog.json" in catalog.DEFAULT_CATALOG_URL
|
assert catalog.DEFAULT_CATALOG_URL.endswith("/presets/catalog.json")
|
||||||
|
|
||||||
def test_community_catalog_url(self, project_dir):
|
def test_community_catalog_url(self, project_dir):
|
||||||
"""Test community catalog URL."""
|
"""Test community catalog URL."""
|
||||||
|
|||||||
Reference in New Issue
Block a user