chore: apply round-7 review nits
- _extract_token.py: narrow `except Exception` to `except (json.JSONDecodeError, ValueError)`. Prevents swallowing KeyboardInterrupt in edge cases and documents intent clearly. - ci.yml shellcheck job: switch to ludeeus/action-shellcheck@master (caches shellcheck binary across runs; saves the apt-get install). Both changes verified locally: YAML parses, extract script still extracts valid tokens and prints the stderr warning on malformed JSON. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f8ba8a2847
commit
ff5149b7df
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -170,9 +170,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Run shellcheck on tests/e2e/*.sh
|
- name: Run shellcheck on tests/e2e/*.sh
|
||||||
run: |
|
uses: ludeeus/action-shellcheck@master
|
||||||
sudo apt-get update -qq && sudo apt-get install -y -qq shellcheck
|
env:
|
||||||
shellcheck --severity=warning tests/e2e/*.sh
|
SHELLCHECK_OPTS: --severity=warning
|
||||||
|
with:
|
||||||
|
scandir: tests/e2e
|
||||||
|
|
||||||
python-lint:
|
python-lint:
|
||||||
name: Python Lint & Test
|
name: Python Lint & Test
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import sys
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
data = json.load(sys.stdin)
|
data = json.load(sys.stdin)
|
||||||
except Exception as e:
|
except (json.JSONDecodeError, ValueError) as e:
|
||||||
sys.stderr.write(f"e2e_extract_token: invalid JSON response ({e})\n")
|
sys.stderr.write(f"e2e_extract_token: invalid JSON response ({e})\n")
|
||||||
print("")
|
print("")
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user