Skip to content

Commit 445eefe

Browse files
committed
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
1 parent 35ced30 commit 445eefe

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ def preset_info(
21372137
license_val = local_pack.data.get("preset", {}).get("license")
21382138
if license_val:
21392139
console.print(f" License: {license_val}")
2140-
console.print(f"\n [green]Status: installed[/green]")
2140+
console.print("\n [green]Status: installed[/green]")
21412141
console.print()
21422142
return
21432143

@@ -2164,7 +2164,7 @@ def preset_info(
21642164
console.print(f" Repository: {pack_info['repository']}")
21652165
if pack_info.get("license"):
21662166
console.print(f" License: {pack_info['license']}")
2167-
console.print(f"\n [yellow]Status: not installed[/yellow]")
2167+
console.print("\n [yellow]Status: not installed[/yellow]")
21682168
console.print(f" Install with: [cyan]specify preset add {pack_id}[/cyan]")
21692169
console.print()
21702170

tests/test_presets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ class TestPresetCatalog:
774774
def test_default_catalog_url(self, project_dir):
775775
"""Test default catalog URL."""
776776
catalog = PresetCatalog(project_dir)
777-
assert "githubusercontent.com" in catalog.DEFAULT_CATALOG_URL
778-
assert "presets/catalog.json" in catalog.DEFAULT_CATALOG_URL
777+
assert catalog.DEFAULT_CATALOG_URL.startswith("https://")
778+
assert catalog.DEFAULT_CATALOG_URL.endswith("/presets/catalog.json")
779779

780780
def test_community_catalog_url(self, project_dir):
781781
"""Test community catalog URL."""

0 commit comments

Comments
 (0)