Use pytest-beartype-tests plugin#1335
Conversation
Replace manual pytest_collection_modifyitems hooks with the https://github.com/adamtheturtle/pytest-beartype-tests dev dependency.
Use git+https dependency until the next PyPI release includes adamtheturtle/pytest-beartype-tests@bc81d99.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 573dbe7. Configure here.
| "pyright==1.1.408", | ||
| "pyroma==5.0.1", | ||
| "pytest==9.0.3", | ||
| "pytest-beartype-tests", |
There was a problem hiding this comment.
Unpinned non-PyPI dependency breaks pip-based dev install
Medium Severity
pytest-beartype-tests is added to optional-dependencies.dev without a version pin and does not appear to be published on PyPI — it's only resolvable via the uv-specific [tool.uv] git source. Every other dev dependency has an explicit version pin. The project's contributing docs (docs/source/contributing.rst) instruct contributors to run pip install --editable '.[dev]', which will now fail because pip doesn't read [tool.uv.sources] and can't find the package on PyPI.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 573dbe7. Configure here.


This PR adds the
pytest-beartype-testsdev dependency and removes redundantpytest_collection_modifyitems/@beartypewiring from conftest where it duplicated the plugin.The plugin registers via
pytest11and applies@beartypeto collected test functions, matching the previous local hook behavior (see the upstream README).Note
Low Risk
Low risk: this only changes test-time type checking wiring by delegating
@beartypeapplication to an external pytest plugin, so impact is limited to how tests are collected/executed.Overview
Moves beartype enforcement for tests from a custom
pytest_collection_modifyitemshook intests/conftest.pyto thepytest-beartype-testsplugin.Adds
pytest-beartype-testsas a dev dependency (with auvgit source pin) and removes the now-redundant localbeartypeimport/hook, plus drops the related Vulture ignore entry.Reviewed by Cursor Bugbot for commit 573dbe7. Bugbot is set up for automated code reviews on this repo. Configure here.