Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lebovits/setup vulture and pylint #911

Merged
merged 4 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ repos:
language: system
files: ^data/src/Pipfile$

- repo: https://github.com/jendrikseipp/vulture
rev: 'v2.3' # or any later Vulture version
hooks:
- id: vulture
name: vulture (Dead code detection)
entry: vulture data/ --exclude=data/src/awkde
language: python
types: [python]
files: ^data/

# JavaScript hooks
- repo: local
hooks:
Expand Down
49 changes: 49 additions & 0 deletions data/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[tool.pylint]
ignore = ["awkde/"]
output-format = "colorized,parseable"

[tool.pylint.'MESSAGES CONTROL']
disable = ["all"]
enable = ["duplicate-code"]

[tool.vulture]
exclude = ["awkde/"]
make_whitelist = true
# min_confidence = 80
sort_by_size = true

[tool.mypy]
ignore_missing_imports = true
exclude = 'awkde/'

[tool.ruff]
# Exclude a variety of commonly ignored directories, plus our own
exclude = [
"awkde/",
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
2 changes: 2 additions & 0 deletions data/src/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ libpysal = "*"
jenkspy = "*"
pyarrow = "*"
tqdm = "*"
vulture = "*"
pylint = "*"

[dev-packages]

Expand Down
Loading
Loading