Skip to content

Commit

Permalink
Merge branch 'main' into append_deps
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Apr 2, 2024
2 parents bf700d7 + d28a9ee commit 9dec407
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
rev: 0.28.1
hooks:
- id: check-github-workflows
args: [ "--verbose" ]
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/3257.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix non-existing branch ``rewrite`` in the documentation to ``main``.
1 change: 1 addition & 0 deletions docs/changelog/3260.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update test typing for build 1.2.0, which has an explicit ``Distribution`` type - by :user:`stefanor`.
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ a pip version of at least ``18.0.0`` and use the following command:

.. code-block:: bash
pip install git+https://github.com/tox-dev/tox.git@rewrite
pip install git+https://github.com/tox-dev/tox.git@main
.. _compatibility-requirements:

Expand Down
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from tox.tox_env.python.virtual_env.api import VirtualEnv

if TYPE_CHECKING:
from build import DistributionType
from pytest_mock import MockerFixture

from tox.config.loader.api import Override
Expand Down Expand Up @@ -135,13 +136,13 @@ def demo_pkg_inline_wheel(tmp_path_factory: pytest.TempPathFactory, demo_pkg_inl
return build_pkg(tmp_path_factory.mktemp("dist"), demo_pkg_inline, ["wheel"])


def build_pkg(dist_dir: Path, of: Path, distributions: list[str], isolation: bool = True) -> Path:
def build_pkg(dist_dir: Path, of: Path, distributions: Sequence[DistributionType], isolation: bool = True) -> Path:
from build.__main__ import build_package # noqa: PLC0415,PLC2701

build_package(str(of), str(dist_dir), distributions=distributions, isolation=isolation)
return next(dist_dir.iterdir())


@pytest.fixture(scope="session")
def pkg_builder() -> Callable[[Path, Path, list[str], bool], Path]:
def pkg_builder() -> Callable[[Path, Path, Sequence[DistributionType], bool], Path]:
return build_pkg

0 comments on commit 9dec407

Please sign in to comment.