Skip to content

Commit

Permalink
feat: replaced vulture with deptry (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankanno authored Oct 26, 2024
1 parent f2f4ecb commit 39ccefb
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 21 deletions.
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ repos:
hooks:
- id: typos
args: ["--config", "_typos.toml", "--force-exclude"]
- repo: https://github.com/jendrikseipp/vulture
rev: v2.11
- repo: https://github.com/fpgmaas/deptry.git
rev: "0.20.0"
hooks:
- id: vulture
- id: deptry
args: ["--ignore", "DEP001,DEP002"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ template is the tool that will help you do just that.
- selectable theme
- [`pdb++`](https://github.com/pdbpp/pdbpp) for debugging
- [`konch`](http://konch.readthedocs.org/en/latest/) for shell configuration w/ [`ipython`](https://ipython.org) support
- [`pre-commit`](https://pre-commit.com) hooks with various hooks (mypy / black / [`ruff`](https://github.com/astral-sh/ruff))
- [`pre-commit`](https://pre-commit.com) hooks with various hooks (mypy / black / [`ruff`](https://github.com/astral-sh/ruff) / [`deptry`](https://github.com/fpgmaas/deptry))
- [`dockerfile`](https://www.docker.com/) for development, testing, and production
- [`dunamai`](https://github.com/mtkennerly/dunamai) for versioning
- custom [`Justfile`](https://github.com/casey/just) (run `just`)
Expand Down
30 changes: 28 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ mypy = "^1.12.1"
pytest-cov = "^5.0.0"
pytest-xdist = "^3.6.1"
ruff = "^0.7.0"
deptry = "^0.20.0"

[tool.poetry.group.docs]
optional = true
Expand Down Expand Up @@ -142,12 +143,6 @@ known_first_party = "{{ cookiecutter.package_name }}"
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
skip = "tests"

[tool.vulture]
make_whitelist = true
min_confidence = 80
paths = ["hooks", "tests"]
sort_by_size = true

[tool.ruff]
extend-exclude = ['[{][{]cookiecutter.package_name[}][}]/tests', '[{][{]cookiecutter.package_name[}][}]/docs', 'docs']
line-length = 79
Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.package_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ repos:
hooks:
- id: typos
args: ["--config", "_typos.toml", "--force-exclude"]
- repo: https://github.com/jendrikseipp/vulture
rev: v2.7
- repo: https://github.com/fpgmaas/deptry.git
rev: "0.20.0"
hooks:
- id: vulture
- id: deptry
7 changes: 1 addition & 6 deletions {{cookiecutter.package_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ black = "^23.1"
hypothesis = "^6.68.2"
mutmut = "^2.4.3"
ruff = "^0.1.3"
deptry = "^0.20.0"

[tool.poetry.group.docs]
optional = true
Expand Down Expand Up @@ -146,12 +147,6 @@ default_section = "THIRDPARTY"
known_first_party = "{{ cookiecutter.package_name }}"
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"

[tool.vulture]
make_whitelist = true
min_confidence = 80
paths = ["./src/{{ cookiecutter.package_name }}/", "./tests/"]
sort_by_size = true

[tool.ruff]
line-length = 79
extend-exclude = ["docs"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

"""Default module for {{ cookiecutter.package_name }}."""

import structlog


LOGGER = structlog.get_logger(__name__)


def hello_world() -> str:
return "Hello World"
Expand Down

0 comments on commit 39ccefb

Please sign in to comment.