From 445eefe5ba7b5df5b8a2a828ba717acd2c20f32c Mon Sep 17 00:00:00 2001 From: Manfred Riem <15701806+mnriem@users.noreply.github.com> Date: Tue, 10 Mar 2026 14:45:16 -0500 Subject: [PATCH] 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 --- src/specify_cli/__init__.py | 4 ++-- tests/test_presets.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index b7ae77eb..593e2e7a 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -2137,7 +2137,7 @@ def preset_info( license_val = local_pack.data.get("preset", {}).get("license") if 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() return @@ -2164,7 +2164,7 @@ def preset_info( console.print(f" Repository: {pack_info['repository']}") if pack_info.get("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() diff --git a/tests/test_presets.py b/tests/test_presets.py index 6ae0d2da..57b9c5d0 100644 --- a/tests/test_presets.py +++ b/tests/test_presets.py @@ -774,8 +774,8 @@ class TestPresetCatalog: def test_default_catalog_url(self, project_dir): """Test default catalog URL.""" catalog = PresetCatalog(project_dir) - assert "githubusercontent.com" in catalog.DEFAULT_CATALOG_URL - assert "presets/catalog.json" in catalog.DEFAULT_CATALOG_URL + assert catalog.DEFAULT_CATALOG_URL.startswith("https://") + assert catalog.DEFAULT_CATALOG_URL.endswith("/presets/catalog.json") def test_community_catalog_url(self, project_dir): """Test community catalog URL."""