Skip to content

fix(jsonl): define module logger after imports to satisfy E402#399

Merged
plind-junior merged 1 commit into
vouchdev:testfrom
dripsmvcp:fix/jsonl-logger-e402
Jul 6, 2026
Merged

fix(jsonl): define module logger after imports to satisfy E402#399
plind-junior merged 1 commit into
vouchdev:testfrom
dripsmvcp:fix/jsonl-logger-e402

Conversation

@dripsmvcp

Copy link
Copy Markdown
Contributor

#361 (RPC traceback-leak fix) inserted _log = logging.getLogger("vouch.jsonl_server") between two import groups in src/vouch/jsonl_server.py. a module-level statement in the middle of the imports trips ruff's E402 (module import not at top of file) on every import that follows it — six of them — so ruff check src tests, the lint step in ci, now fails on the whole test branch. any pr opened or re-run after #361 landed goes red on lint through no fault of its own.

this moves the logger definition to just below the import block, exactly where storage.py already keeps its own module logger (_log = logging.getLogger("vouch.storage")). no behaviour change — same logger, same name, defined a few lines lower.

Test Plan

  • ruff check src testsAll checks passed! (was: 6 × E402)
  • pytest tests/test_jsonl_server.py green
  • mypy src clean

before (on current test):

E402 Module level import not at top of file
  --> src/vouch/jsonl_server.py:45:1
...
Found 6 errors.

after: clean.

vouchdev#361 inserted `_log = logging.getLogger(...)` between two import
groups in jsonl_server.py. that statement-among-imports trips ruff's
E402 on every import that follows it, so `ruff check src tests` — the
lint gate in ci — now fails on the whole repo. move the logger
definition below the imports (where storage.py already keeps its own
module logger); no behaviour change.
@github-actions github-actions Bot added mcp mcp, jsonl, and http surfaces size: XS less than 50 changed non-doc lines labels Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 164714bb-1f23-469f-a8a7-f4148eb81dcf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@plind-junior plind-junior merged commit b4fd469 into vouchdev:test Jul 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp mcp, jsonl, and http surfaces size: XS less than 50 changed non-doc lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants