Skip to content

Commit b070a3e

Browse files
committed
fix: extract border label to fix line length lint
Also add CLAUDE.md with lint check reminders.
1 parent 41f9814 commit b070a3e

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Development
2+
3+
## Linting
4+
5+
Always check for lint before committing:
6+
7+
```
8+
uvx ruff check apick.py tests/
9+
uvx ty check apick.py
10+
```

apick.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ def pick_endpoint(endpoints: list[dict], spec: dict, script_path: str) -> dict |
245245
json.dump(spec, spec_file)
246246
spec_file_name = spec_file.name
247247

248+
api_title = spec.get("info", {}).get("title")
249+
border_label = f" apick — {api_title} " if api_title else " apick "
250+
248251
try:
249252
preview_cmd = (
250253
f"{sys.executable} {script_path} --_preview {{1}} --_spec-file {spec_file_name}"
@@ -258,7 +261,7 @@ def pick_endpoint(endpoints: list[dict], spec: dict, script_path: str) -> dict |
258261
"--nth", "2..",
259262
"--with-nth", "2..",
260263
"--border", "rounded",
261-
"--border-label", f" apick — {spec.get('info', {}).get('title', '')} " if spec.get("info", {}).get("title") else " apick ",
264+
"--border-label", border_label,
262265
"--pointer", "▶",
263266
"--header",
264267
"Select an endpoint (type to search)",

0 commit comments

Comments
 (0)