v0.3.0
Minor Changes
-
#4
e25c754- feat: publish prebuilt binaries on GitHub releases.Releases now attach binaries for ten targets (Linux gnu/musl on x86_64, aarch64, and armv7; macOS x86_64 and aarch64; Windows x86_64 and aarch64) with sha256 checksums, so
cargo binstall pyproject-udepsworks and CI can install viataiki-e/install-actionwithout a compile. -
#4
e25c754- feat: renamepoetry-udepstopyproject-udeps.The tool is no longer poetry-only, so the name follows the file it actually analyzes. Install it with
cargo install pyproject-udeps(orcargo binstall pyproject-udeps); the binary is nowpyproject-udeps. The ignorefile is.pyprojectudepsignore, and an existing.poetryudepsignorekeeps working as a fallback. One lastpoetry-udepsrelease on crates.io points here. -
#4
e25c754- feat: parse Python with ruff's parser instead of scanning text for import statements.Imports are now collected from a real AST, which fixes a family of accuracy bugs:
from x import a, bcounted onlya,from x import *counted nothing,'''-quoted docstrings were not skipped, and text likex = "import os"produced phantom imports. Imports nested in functions andtry/except ImportErrorblocks are found, files with syntax errors still contribute whatever parses, andimportlib.import_module("...")and__import__("...")calls with literal arguments now count as usage. Reports may legitimately change on upgrade: dependencies that only appeared inside strings or docstrings will newly show up as unused. -
#4
e25c754- feat: support uv and plain PEP 621 projects, not just poetry.Dependencies are now read from every place
pyproject.tomlcan declare them:[project.dependencies], every[project.optional-dependencies]extra,[tool.poetry.dependencies], every[tool.poetry.group.*](previously only thedevgroup was checked), PEP 735[dependency-groups], and the legacy[tool.uv] dev-dependenciesarray. Hybrid layouts take the union, so a wrong guess about which tool manages the project can never drop a declaration.--virtualenvalso stopped assuming poetry: the environment is discovered from the lockfile and tool tables, usingpoetry env info -pfor poetry projects,$UV_PROJECT_ENVIRONMENTor.venvfor uv projects, and$VIRTUAL_ENVor.venvotherwise.
Patch Changes
-
#4
e25c754- fix: stop reporting used dev dependencies that import under a different name.A dev dependency imported through an alias (for example
scikit-learnimported assklearn) was still reported as unused under--dev, because the match removed the wrong bookkeeping entry. -
#4
e25c754- fix: stop crashing onimport dbt.adaptersand on non-UTF-8 Python files.A bare two-segment
import dbt.adapterspanicked the matcher, and a single.pyfile with non-UTF-8 bytes (latin-1 comments in legacy code, say) crashed the project scan. Both now behave: the dbt heuristic only fires with an adapter segment present, and files are read lossily everywhere. -
#4
e25c754- fix: honor the--no-ignoreflag.The flag was accepted but never read, so there was no way to see the report without ignorefile filtering. It now bypasses the ignorefile as documented.
All notable changes to this project will be documented in this file. See conventional commits for commit guidelines.
$ git-stats v0.2.10..v0.3.0 Author Commits Changed Files Insertions Deletions Net Δ Luke Hsiao 25 101 +6233 -1906 +4327 Total 25 101 +6233 -1906 +4327