Skip to content

Drop pytest-flake8 from test requirements to fix CI on pytest 9 - #137

Merged
jamt9000 merged 1 commit into
unitaryai:masterfrom
cristianchiriac:drop-pytest-flake8
Oct 14, 2026
Merged

jamt9000 merged 1 commit into
unitaryai:masterfrom
cristianchiriac:drop-pytest-flake8

Conversation

@cristianchiriac

@cristianchiriac cristianchiriac commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The CI testing workflow currently fails on every OS before a single test is collected:

pluggy._manager.PluginValidationError: Plugin 'flake8' for hook 'pytest_collect_file'
hookimpl definition: pytest_collect_file(file_path, path, parent)
Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

pytest 9 removed the legacy py.path path hook argument, and the latest pytest-flake8 (1.3.0) still declares it, so pytest refuses to load the plugin. Nothing in the repo actually uses it (--flake8 isn't in addopts, and linting runs through ruff in pre-commit), so this just removes it from tests/requirements.txt. The standalone flake8 entry is left as is.

Tested locally on Python 3.11 with the same versions as the failing run (pytest 9.1.1, torch 2.14.1, transformers 5.18.0, datasets 5.1.0):

  • before: pytest src tests fails with the error above
  • after: 15 passed

Summary by CodeRabbit

  • Chores
    • Removed a linting tool from the test environment requirements. The remaining listed requirements are unchanged, and this update does not change end-user functionality.

pytest-flake8 1.3.0 still declares the py.path `path` argument in its
pytest_collect_file hook, which pytest 9 removed, so pytest refuses to
load the plugin and CI fails before collecting any tests. The plugin is
never enabled (no --flake8 in addopts) and linting already runs through
ruff in pre-commit.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 654b6b62-88c0-4024-a39c-ab0f48738b81
📥 Commits

Reviewing files that changed from the base of the PR and between d537644 and 05c1d01.

📒 Files selected for processing (1)
  • tests/requirements.txt
💤 Files with no reviewable changes (1)
  • tests/requirements.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

The test requirements remove pytest-flake8. All other listed requirements remain unchanged.

Changes

Test requirements

Layer / File(s) Summary
Remove pytest-flake8
tests/requirements.txt
The requirements file no longer lists pytest-flake8. Other listed requirements remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 05c1d

No actionable merge-blocking risk was found in the dependency removal. Normal checks can proceed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states that the change removes pytest-flake8 to address a CI failure with pytest 9.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@jamt9000
jamt9000 merged commit c3f7c04 into unitaryai:master Oct 14, 2026
2 checks passed
@jamt9000

Copy link
Copy Markdown
Collaborator

Thank you Cristian!

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.

2 participants