Skip to content

Commit

Permalink
Add linting with deptry.
Browse files Browse the repository at this point in the history
  • Loading branch information
MylesBartlett committed Dec 3, 2024
1 parent 3080c5d commit 741210f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 54 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ repos:
pass_filenames: false
require_serial: true
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: make-lint
name: Make lint
description: Lints files using the `make lint` command
entry: make lint
language: system
pass_filenames: false
require_serial: true
stages: [pre-commit, pre-merge-commit, pre-push, manual]

- id: make-test
name: Make test
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"numpy>=1.26.3",
"joblib>=1.4.2",
"typing-extensions>=4.12.2",
"bump2version>=1.0.1",
]
readme = "README.md"
Expand All @@ -45,11 +43,16 @@ dev = [
"pytest-cov>=6.0.0",
"pytest>=8.3.3",
"ruff>=0.7.3",
"deptry>=0.21.1",
]

[tool.uv]
managed = true

[tool.deptry.per_rule_ignores]
DEP004 = ["pytest"]
DEP002 = ["bump2version"]

[tool.rye]
dev-dependencies = [
"pytest>=8.3.1",
Expand All @@ -62,6 +65,7 @@ dev-dependencies = [
"ruff>=0.5.4",
"black[colorama]>=24.4.2",
"bump2version>=1.0.1",
"deptry>=0.21.1",
]
managed = true
repository = "https://github.com/MylesBartlett/serox"
Expand Down
10 changes: 8 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ cfgv==3.4.0
# via pre-commit
click==8.1.7
# via black
# via deptry
# via pydoclint
codespell==2.3.0
colorama==0.4.6
# via black
coverage==7.6.0
# via pytest-cov
deptry==0.21.1
distlib==0.3.8
# via virtualenv
docstring-parser-fork==0.0.9
Expand All @@ -40,11 +42,11 @@ mypy-extensions==1.0.0
nodeenv==1.9.1
# via pre-commit
# via pyright
numpy==2.0.1
# via serox
packaging==24.1
# via black
# via deptry
# via pytest
# via requirements-parser
pathspec==0.12.1
# via black
pip==24.2
Expand All @@ -61,7 +63,11 @@ pytest==8.3.2
pytest-cov==5.0.0
pyyaml==6.0.1
# via pre-commit
requirements-parser==0.11.0
# via deptry
ruff==0.5.5
types-setuptools==75.6.0.20241126
# via requirements-parser
typing-extensions==4.12.2
# via serox
virtualenv==20.26.3
Expand Down
2 changes: 0 additions & 2 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ bump2version==1.0.1
# via serox
joblib==1.4.2
# via serox
numpy==2.0.1
# via serox
typing-extensions==4.12.2
# via serox
3 changes: 2 additions & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rye run lint-doc
# spelling
## codespell
echo "[codespell] Checking spelling..."
rye run codespell
uv run codespell
uv run deptry .

echo "✨ Done linting ✨"
87 changes: 40 additions & 47 deletions uv.lock

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

0 comments on commit 741210f

Please sign in to comment.