Skip to content

Commit 8ab5ed5

Browse files
committed
Fix ruff issue
1 parent 37f17ad commit 8ab5ed5

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

src/superqode/app_main.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12868,8 +12868,7 @@ def sort_example_models(model_id: str) -> int:
1286812868
model_lower = model_id.lower()
1286912869
# Latest models get higher priority (lower number)
1287012870
if any(
12871-
x in model_lower
12872-
for x in ["4.7", "5.2", "5.1", "3.2", "3.3", "k2", "6.5"]
12871+
x in model_lower for x in ["4.7", "5.2", "5.1", "3.2", "3.3", "k2", "6.5"]
1287312872
):
1287412873
return 0
1287512874
elif any(x in model_lower for x in ["4.5", "4-plus", "4-air", "2.5"]):
@@ -12881,9 +12880,7 @@ def sort_example_models(model_id: str) -> int:
1288112880

1288212881
for idx, model in enumerate(sorted_models[:15], 1): # Show more models
1288312882
# Highlight current selection
12884-
is_highlighted = (idx - 1) == getattr(
12885-
self, "_byok_highlighted_model_index", 0
12886-
)
12883+
is_highlighted = (idx - 1) == getattr(self, "_byok_highlighted_model_index", 0)
1288712884
if is_highlighted:
1288812885
t.append(f" ▶ ", style=f"bold {THEME['success']}")
1288912886
t.append(f"[{idx:2}] ", style=f"bold {THEME['success']}")
@@ -12893,9 +12890,7 @@ def sort_example_models(model_id: str) -> int:
1289312890
for x in ["4.7", "5.2", "5.1", "3.2", "3.3", "k2", "6.5"]
1289412891
)
1289512892
name_style = (
12896-
f"bold {THEME['success']}"
12897-
if is_latest
12898-
else f"bold {THEME['success']}"
12893+
f"bold {THEME['success']}" if is_latest else f"bold {THEME['success']}"
1289912894
)
1290012895
t.append(f"{model}", style=name_style)
1290112896
t.append(f" ← SELECTED\n", style=f"bold {THEME['success']}")
@@ -13175,9 +13170,7 @@ async def _show_local_provider_models(self, provider_id: str, log: ConversationL
1317513170
t = Text()
1317613171
t.append(f"\n ◈ ", style=f"bold {THEME['purple']}")
1317713172
t.append(f"{provider_def.name} Models\n", style=f"bold {THEME['text']}")
13178-
t.append(
13179-
f" {len(cached_models)} locally cached model(s)\n\n", style=THEME["dim"]
13180-
)
13173+
t.append(f" {len(cached_models)} locally cached model(s)\n\n", style=THEME["dim"])
1318113174

1318213175
# Store model list for selection
1318313176
self._local_selected_provider = provider_id
@@ -13465,9 +13458,7 @@ def _redraw_local_provider_models(self, log: ConversationLog):
1346513458
t = Text()
1346613459
t.append(f"\n ◈ ", style=f"bold {THEME['purple']}")
1346713460
t.append(f"{provider_def.name} Models\n", style=f"bold {THEME['text']}")
13468-
t.append(
13469-
f" {len(model_list)} locally cached model(s)\n\n", style=THEME["dim"]
13470-
)
13461+
t.append(f" {len(model_list)} locally cached model(s)\n\n", style=THEME["dim"])
1347113462

1347213463
highlighted_idx = getattr(self, "_local_highlighted_model_index", 0)
1347313464
for idx, model_id in enumerate(model_list, 1):

src/superqode/commands/acp.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,12 @@ async def install_agent_async():
854854

855855
# Verify installation
856856
if check_agent_installed(agent):
857-
_console.print(f"[green]✓ Agent '{agent['short_name']}' is ready to use![/green]")
858-
_console.print(f"[dim]Try: superqode agents connect {agent['short_name']}[/dim]")
857+
_console.print(
858+
f"[green]✓ Agent '{agent['short_name']}' is ready to use![/green]"
859+
)
860+
_console.print(
861+
f"[dim]Try: superqode agents connect {agent['short_name']}[/dim]"
862+
)
859863
else:
860864
_console.print("[yellow]⚠️ Agent installed but verification failed[/yellow]")
861865
_console.print(

src/superqode/providers/huggingface/hub.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ def discover_cached_models(cache_dirs: Optional[List[Path]] = None) -> List[Dict
6868

6969
# Sort newest first, then by id for stability (None modified goes last)
7070
models = list(models_by_id.values())
71+
7172
def sort_key(m: Dict[str, Any]) -> tuple:
7273
modified = m.get("modified")
7374
ts = modified.timestamp() if modified else 0.0
7475
return (modified is None, -ts, m["id"])
76+
7577
models.sort(key=sort_key)
7678
return models
7779

src/superqode/providers/manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,9 @@ def list_providers(self) -> List[ProviderInfo]:
520520
requires_api_key=True,
521521
configured=self._is_provider_configured("openai"),
522522
models=[
523-
ModelInfo("gpt-5.3-codex", "GPT-5.3 Codex (Latest/New)", "openai", context_size=256000),
523+
ModelInfo(
524+
"gpt-5.3-codex", "GPT-5.3 Codex (Latest/New)", "openai", context_size=256000
525+
),
524526
ModelInfo("gpt-5.2", "GPT-5.2 (Latest)", "openai", context_size=256000),
525527
ModelInfo("gpt-5.2-pro", "GPT-5.2 Pro", "openai", context_size=256000),
526528
ModelInfo("gpt-5.2-codex", "GPT-5.2 Codex", "openai", context_size=256000),

tests/test_auth.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@ def test_parse_api(self):
161161

162162
def test_parse_oauth(self):
163163
"""Parses OAuth auth correctly."""
164-
result = parse_auth_info({
165-
"type": "oauth",
166-
"refresh": "r",
167-
"access": "a",
168-
"expires": 123,
169-
})
164+
result = parse_auth_info(
165+
{
166+
"type": "oauth",
167+
"refresh": "r",
168+
"access": "a",
169+
"expires": 123,
170+
}
171+
)
170172
assert isinstance(result, OAuthAuth)
171173
assert result.refresh == "r"
172174

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)