Skip to content

fix(tests): move mid-file import to top of test_parsers.py#34

Merged
pipe1os merged 2 commits into
mainfrom
fix/test-parsers-import-order
Jun 24, 2026
Merged

fix(tests): move mid-file import to top of test_parsers.py#34
pipe1os merged 2 commits into
mainfrom
fix/test-parsers-import-order

Conversation

@pipe1os

@pipe1os pipe1os commented Jun 24, 2026

Copy link
Copy Markdown
Owner

PR #31 introduced the _get_hf_endpoint tests but placed the import mid-file (line 52), which triggers E402 Module level import not at top of file. Moved it to the import block at the top.

Summary by CodeRabbit

  • Tests
    • Cleaned up the parser test suite for better readability and organization.
    • Kept the Hugging Face endpoint checks grouped with the related parser tests so they’re easier to follow.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e5daf239-a40b-498a-be0f-fc196d3faf8c

📥 Commits

Reviewing files that changed from the base of the PR and between 99a7a5f and 0edd768.

📒 Files selected for processing (1)
  • tests/test_parsers.py

Walkthrough

The _get_hf_endpoint import in tests/test_parsers.py is moved from a mid-file inline block (with an accompanying section comment) to the top-level import section. The duplicate import and its comment are removed.

Changes

Import reorganization in test_parsers.py

Layer / File(s) Summary
Consolidate _get_hf_endpoint import
tests/test_parsers.py
Import of _get_hf_endpoint added at the module's top-level imports; the earlier inline re-import and its "HF_ENDPOINT validation" section comment are removed from the middle of the file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is too sparse and omits most required template sections, including testing, change type, and the checklist. Add the missing template sections: Summary, Motivation & Context, Type of Change, How Has This Been Tested?, and the Checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: moving the test import to the top of test_parsers.py.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/test-parsers-import-order

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

@pipe1os
pipe1os merged commit 4963262 into main Jun 24, 2026
10 checks passed
@pipe1os
pipe1os deleted the fix/test-parsers-import-order branch June 24, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant