Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ optional-dependencies.dev = [
"pyright==1.1.408",
"pyroma==5.0.1",
"pytest==9.0.3",
"pytest-beartype-tests",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 573dbe7. Configure here.

"pytest-cov==7.1.0",
"pytest-regressions==2.10.0",
"ruff==0.15.11",
Expand All @@ -83,6 +84,9 @@ urls.Documentation = "https://vws-python.github.io/vws-web-tools/"
urls.Source = "https://github.com/VWS-Python/vws-web-tools"
scripts.vws-web-tools = "vws_web_tools:vws_web_tools_group"

[dependency-groups]
dev = []

[tool.setuptools]
zip-safe = false
package-data.vws_web_tools = [
Expand All @@ -103,6 +107,9 @@ bdist_wheel.universal = true
# Code to match this is in ``conf.py``.
version_scheme = "post-release"

[tool.uv]
sources.pytest-beartype-tests = { git = "https://github.com/adamtheturtle/pytest-beartype-tests.git", rev = "bc81d99" }

[tool.ruff]
line-length = 79
lint.select = [
Expand Down Expand Up @@ -326,7 +333,6 @@ ignore_path = [
ignore_names = [
# pytest configuration
"pytest_collect_file",
"pytest_collection_modifyitems",
"pytest_plugins",
# pytest fixtures - we name fixtures like this for this purpose
"fixture_*",
Expand Down
14 changes: 0 additions & 14 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os

import pytest
from beartype import beartype

from tests.credentials import VWSCredentials

Expand All @@ -15,16 +14,3 @@ def fixture_vws_credentials() -> VWSCredentials:
email_address=os.environ["VWS_EMAIL_ADDRESS"],
password=os.environ["VWS_PASSWORD"],
)


@beartype
def pytest_collection_modifyitems(
session: pytest.Session,
config: pytest.Config,
items: list[pytest.Item],
) -> None:
"""Apply the beartype decorator to all collected test functions."""
del session, config
for item in items:
assert isinstance(item, pytest.Function)
item.obj = beartype(obj=item.obj)
Loading