From a3f8e27eb61f39d98157c2dd24f71eefc06abd88 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Fri, 13 Sep 2024 08:10:03 +0200 Subject: [PATCH 1/8] Add link to Vulture GitHub Action. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7275f6cd..a230ed93 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ Vulture will automatically look for a `pyproject.toml` in the current working di To use a `pyproject.toml` in another directory, you can use the `--config path/to/pyproject.toml` flag. -## Version control integration +## Integrations You can use a [pre-commit](https://pre-commit.com/#install) hook to run Vulture before each commit. For this, install pre-commit and add the @@ -207,6 +207,8 @@ Then run `pre-commit install`. Finally, create a `pyproject.toml` file in your repository and specify all files that Vulture should check under `[tool.vulture] --> paths` (see above). +There's also a [GitHub Action for Vulture](https://github.com/gtkacz/vulture-action). + ## How does it work? Vulture uses the `ast` module to build abstract syntax trees for all From 4df68f8e0cea556f202217be23b572fd5071868d Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 17 Sep 2024 18:55:33 +0200 Subject: [PATCH 2/8] Update changelog. --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4c4a9f7..8556c512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,8 @@ -# next (unreleased) +# 2.12 (2024-09-17) -* Use `ruff` for linting (Anh Trinh, #347). -* Use `ruff` for formatting (Anh Trinh, #349). +* Use `ruff` for linting and formatting (Anh Trinh, #347, #349). * Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349). -* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson #352). +* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson, #352). # 2.11 (2024-01-06) From 224dc09997d6816230cac34dd2ba284b927dbe50 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 17 Sep 2024 18:55:56 +0200 Subject: [PATCH 3/8] Update version number to 2.12 for release. --- vulture/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vulture/version.py b/vulture/version.py index 3e58dd32..36b665ad 100644 --- a/vulture/version.py +++ b/vulture/version.py @@ -1 +1 @@ -__version__ = "2.11" +__version__ = "2.12" From 6d9883458da9065112d21c876c252fd97e9c1ba0 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:05:09 -0400 Subject: [PATCH 4/8] Add PyPI and conda-forge badges (#356) --- CHANGELOG.md | 4 ++++ README.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8556c512..5cec65db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.13 (unreleased) + +* Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). + # 2.12 (2024-09-17) * Use `ruff` for linting and formatting (Anh Trinh, #347, #349). diff --git a/README.md b/README.md index a230ed93..45bb3c44 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Vulture - Find dead code +[![PyPI Version](https://img.shields.io/pypi/v/vulture.svg)](https://pypi.python.org/pypi/vulture) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/vulture.svg)](https://anaconda.org/conda-forge/vulture) ![CI:Test](https://github.com/jendrikseipp/vulture/workflows/CI/badge.svg) [![Codecov Badge](https://codecov.io/gh/jendrikseipp/vulture/branch/main/graphs/badge.svg)](https://codecov.io/gh/jendrikseipp/vulture?branch=main) From 26ce978a2ecbb5195df9c84808e3a70cd7b2711f Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 27 Sep 2024 12:14:01 +0100 Subject: [PATCH 5/8] Include tests/**/*.toml in sdist (#368) Otherwise `test_toml_config_custom_path` fails when run from the sdist. --- CHANGELOG.md | 1 + MANIFEST.in | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cec65db..03509bd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 2.13 (unreleased) * Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). +* Include `tests/**/*.toml` in sdist (Colin Watson). # 2.12 (2024-09-17) diff --git a/MANIFEST.in b/MANIFEST.in index df6df808..22e0ead7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include *.md include *.txt include tests/*.py +include tests/**/*.toml include tox.ini include vulture/whitelists/*.py From b7ae5b3e08c6a3cc92c761f9e678ffacdd7dc93a Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:55:35 +0200 Subject: [PATCH 6/8] Add support for Python 3.13. (#369) --- .github/workflows/main.yml | 3 ++- CHANGELOG.md | 1 + setup.py | 1 + tests/__init__.py | 5 ++++- tox.ini | 10 +++++----- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2a1d119..812f811a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout code @@ -26,6 +26,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 03509bd7..d62b1398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 2.13 (unreleased) +* Add support for Python 3.13 (Jendrik Seipp, #369). * Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). * Include `tests/**/*.toml` in sdist (Colin Watson). diff --git a/setup.py b/setup.py index d9187eac..e9a453f8 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ def find_version(*parts): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Quality Assurance", diff --git a/tests/__init__.py b/tests/__init__.py index 58e1da85..c54b3877 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -8,7 +8,10 @@ REPO = pathlib.Path(__file__).resolve().parents[1] WHITELISTS = [ - str(path) for path in (REPO / "vulture" / "whitelists").glob("*.py") + str(path) + for path in (REPO / "vulture" / "whitelists").glob("*.py") + # Pint is incompatible with Python 3.13 (https://github.com/hgrecco/pint/issues/1969). + if sys.version_info < (3, 13) or path.name != "pint_whitelist.py" ] diff --git a/tox.ini b/tox.ini index 4ca649a9..3d363561 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,20 @@ [tox] -envlist = cleanup, py{38,310,311,312}, style # Skip py39 since it chokes on distutils. +envlist = cleanup, py{38,310,311,312,313}, style # Skip py39 since it chokes on distutils. skip_missing_interpreters = true # Erase old coverage results, then accumulate them during this tox run. [testenv:cleanup] deps = - coverage==7.0.5 + coverage commands = coverage erase [testenv] deps = - coverage==7.0.5 + coverage pint # Use latest version to catch API changes. - pytest==7.4.2 - pytest-cov==4.0.0 + pytest + pytest-cov commands = pytest {posargs} # Install package as wheel in all envs (https://hynek.me/articles/turbo-charge-tox/). From ea66db28999ee141b71bf7021299498a96a66130 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Wed, 2 Oct 2024 14:10:11 +0200 Subject: [PATCH 7/8] Add release date. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d62b1398..1a944eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 2.13 (unreleased) +# 2.13 (2024-10-02) * Add support for Python 3.13 (Jendrik Seipp, #369). * Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). From d21ad35d53bfa32ec8f090de6bb9f4af80076365 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Wed, 2 Oct 2024 14:10:27 +0200 Subject: [PATCH 8/8] Update version number to 2.13 for release. --- vulture/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vulture/version.py b/vulture/version.py index 36b665ad..a7e46e76 100644 --- a/vulture/version.py +++ b/vulture/version.py @@ -1 +1 @@ -__version__ = "2.12" +__version__ = "2.13"