From dab11dbfacc9333055e09e126d3476459c546610 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:59:52 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/python-jsonschema/check-jsonschema: 0.28.0 → 0.30.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.0...0.30.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) - [github.com/tox-dev/tox-ini-fmt: 1.3.1 → 1.4.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.3.1...1.4.1) - [github.com/tox-dev/pyproject-fmt: 1.7.0 → v2.5.0](https://github.com/tox-dev/pyproject-fmt/compare/1.7.0...v2.5.0) - [github.com/psf/black-pre-commit-mirror: 24.3.0 → 24.10.0](https://github.com/psf/black-pre-commit-mirror/compare/24.3.0...24.10.0) - [github.com/astral-sh/ruff-pre-commit: v0.3.4 → v0.8.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.4...v0.8.4) - [github.com/pdm-project/pdm: 2.13.2 → 2.22.1](https://github.com/pdm-project/pdm/compare/2.13.2...2.22.1) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f63f917..12ddb29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: python: python3.11 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-toml - id: trailing-whitespace @@ -15,40 +15,40 @@ repos: - id: fix-byte-order-marker - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.0 + rev: 0.30.0 hooks: - id: check-github-workflows args: ["--verbose"] - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: ["--write-changes", "--skip=pdm.lock"] - repo: https://github.com/tox-dev/tox-ini-fmt - rev: "1.3.1" + rev: "1.4.1" hooks: - id: tox-ini-fmt - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.7.0" + rev: "v2.5.0" hooks: - id: pyproject-fmt additional_dependencies: ["tox>=4.14.1"] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.3.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.4 + rev: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/pdm-project/pdm - rev: 2.13.2 + rev: 2.22.1 hooks: - id: pdm-lock-check From 91e0b6aaddb7876874edc87f39331c779f5aefc9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 00:00:04 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 148 +++++++++++++++++----------------- tests/fixtures/pyproject.toml | 21 +++-- tests/test_clean.py | 1 + 3 files changed, 83 insertions(+), 87 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d992dae..f6db9b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ name = "pdm-wheel" description = "PDM plugin that save your requirements as wheels, similar to pip-wheel" readme = "README.md" license = { text = "MIT" } -authors = [{ name = "Gabriel Dugny", email = "pdm-wheel@dugny.me" }] +authors = [ { name = "Gabriel Dugny", email = "pdm-wheel@dugny.me" } ] requires-python = ">=3.9" classifiers = [ "Development Status :: 2 - Pre-Alpha", @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Typing :: Typed", ] dynamic = [ @@ -29,19 +30,16 @@ dynamic = [ ] dependencies = [ ] -[project.optional-dependencies] -pdm = [ - "pdm!=2.13.0,!=2.13.1,>=2.7.4", +optional-dependencies.pdm = [ + "pdm>=2.7.4,!=2.13,!=2.13.1", ] -[project.urls] -"Bug Tracker" = "https://github.com/GabDug/pdm-wheel/issues" -"Changelog" = "https://github.com/GabDug/pdm-wheel/blob/main/CHANGELOG.md" -"Homepage" = "https://github.com/GabDug/pdm-wheel" -[project.entry-points.pdm] -pdm-wheel = "pdm_wheel:register_pdm_plugin" +urls."Bug Tracker" = "https://github.com/GabDug/pdm-wheel/issues" +urls."Changelog" = "https://github.com/GabDug/pdm-wheel/blob/main/CHANGELOG.md" +urls."Homepage" = "https://github.com/GabDug/pdm-wheel" +entry-points.pdm.pdm-wheel = "pdm_wheel:register_pdm_plugin" [tool.pdm] -plugins = ["sync-pre-commit-lock", "-e ."] +plugins = [ "sync-pre-commit-lock", "-e ." ] [tool.pdm.version] source = "scm" @@ -50,44 +48,44 @@ write_template = "__version__: str = \"{}\"\n" [tool.pdm.build] package-dir = "src" -includes = ["src", "src/pdm_wheel"] +includes = [ "src", "src/pdm_wheel" ] excludes = [ - "tests/.*", - "tests/build", - "tests/fixtures/.*", - "tests/fixtures/wheels", - ".venv", - ".pdm-python", + "tests/.*", + "tests/build", + "tests/fixtures/.*", + "tests/fixtures/wheels", + ".venv", + ".pdm-python", ] [tool.pdm.scripts] -fmt = {cmd="black .", help="Run black formatter"} +fmt = { cmd = "black .", help = "Run black formatter" } test = "pytest" -test-cov = {cmd="pytest --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html --cov-report=term-missing", help="Run tests with coverage"} -doc = {shell = "cd docs && mkdocs serve", help = "Start the dev server for doc preview"} +test-cov = { cmd = "pytest --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html --cov-report=term-missing", help = "Run tests with coverage" } +doc = { shell = "cd docs && mkdocs serve", help = "Start the dev server for doc preview" } lint = "pre-commit run --all-files" -lint-mypy = {cmd="mypy src", help="Run mypy type checker"} -lint-ruff = {cmd="ruff check .", help="Run ruff linter"} +lint-mypy = { cmd = "mypy src", help = "Run mypy type checker" } +lint-ruff = { cmd = "ruff check .", help = "Run ruff linter" } [tool.pdm.dev-dependencies] dev = [ - "black>=22.10.0", - "mypy>=1.4", - "pylint>=2.15.4", - "pytest>=7.2.0", - "pytest-cov>=4.0.0", - "pdm>=2.4.0", - "ruff>=0.0.270", - "parver>=0.4", - "ipdb>=0.13.13", - "tox>=4.14.2", - "tox-pdm>=0.7.2", - "tox-gh>=1.3.1", + "black>=22.10.0", + "mypy>=1.4", + "pylint>=2.15.4", + "pytest>=7.2.0", + "pytest-cov>=4.0.0", + "pdm>=2.4.0", + "ruff>=0.0.270", + "parver>=0.4", + "ipdb>=0.13.13", + "tox>=4.14.2", + "tox-pdm>=0.7.2", + "tox-gh>=1.3.1", ] -testtox= [ - "pytest>=7.2.0", - "pytest-cov>=4.0.0", - "click>=8.1.7", +testtox = [ + "pytest>=7.2.0", + "pytest-cov>=4.0.0", + "click>=8.1.7", ] [tool.black] @@ -109,62 +107,60 @@ extend-exclude = ''' ''' [tool.ruff] -exclude = [".git", "tests/fixtures/*", "env", "dist", "build", "__pypackages__"] line-length = 120 -[tool.ruff.lint] -extend-ignore = ["S101", "E501"] -extend-select = [ - "E", - "F", - "W", - "TCH", - "I", - "Q000", - "TCH", - "I001", - "S", - "T", - "PTH", - "PYI", - "RET", - "D209", - "D202", - "EM101", +exclude = [ ".git", "__pypackages__", "build", "dist", "env", "tests/fixtures/*" ] +lint.extend-select = [ + "D202", + "D209", + "E", + "EM101", + "F", + "I", + "I001", + "PTH", + "PYI", + "Q000", + "RET", + "S", + "T", + "TCH", + "W", ] +lint.extend-ignore = [ "E501", "S101" ] [tool.pytest.ini_options] minversion = "7.0" -testpaths = ["tests"] +testpaths = [ "tests" ] norecursedirs = "*.egg .eggs dist build docs .tox .git __pycache__ node_modules .venv __pypackages__" [tool.coverage.paths] -source =[ - "src", - "*/site-packages" +source = [ + "src", + "*/site-packages", ] [tool.coverage.run] branch = true parallel = true -include = ["src/*"] -omit = ["*/tests/*"] -source = ["src", "tests"] +include = [ "src/*" ] +omit = [ "*/tests/*" ] +source = [ "src", "tests" ] [tool.coverage.report] show_missing = true precision = 2 exclude_lines = [ - "def __repr__", - "if TYPE_CHECKING:", - "raise AssertionError", - "raise NotImplementedError", - "if __name__ == .__main__.:", - 'class .*\bProtocol\):', - '@(abc\.)?abstractmethod]', - "except ImportError:", - "# nocov", + "def __repr__", + "if TYPE_CHECKING:", + "raise AssertionError", + "raise NotImplementedError", + "if __name__ == .__main__.:", + 'class .*\bProtocol\):', + '@(abc\.)?abstractmethod]', + "except ImportError:", + "# nocov", ] [tool.mypy] -files = ["src"] +files = [ "src" ] strict = true diff --git a/tests/fixtures/pyproject.toml b/tests/fixtures/pyproject.toml index b384201..c74559d 100644 --- a/tests/fixtures/pyproject.toml +++ b/tests/fixtures/pyproject.toml @@ -1,12 +1,17 @@ +[build-system] +build-backend = "pdm.backend" +requires = [ + "pdm-backend", +] [project] name = "test-project" version = "0.1.0" description = "" readme = "README.md" -license = {text = "MIT"} +license = { text = "MIT" } authors = [ - {name = "John Doe", email = "john@d.oe"}, + { name = "John Doe", email = "john@d.oe" }, ] requires-python = ">=3.9" classifiers = [ @@ -15,22 +20,16 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "requests==2.28.2", ] -[project.optional-dependencies] -opt = [ +optional-dependencies.opt = [ "pathspec>=0.7", ] -[build-system] -build-backend = "pdm.backend" -requires = [ - "pdm-backend", -] - [tool.pdm.dev-dependencies] dev = [ - "black>=23.3.0", + "black>=23.3.0", ] diff --git a/tests/test_clean.py b/tests/test_clean.py index 086492f..fd3972f 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -2,6 +2,7 @@ from pathlib import Path import pytest + from pdm_wheel import ExportWheelsCommand