Skip to content

Commit

Permalink
Merge pull request #911 from CodeForPhilly/lebovits/setup-vulture-and…
Browse files Browse the repository at this point in the history
…-pylint

Lebovits/setup vulture and pylint
  • Loading branch information
nlebovits committed Sep 27, 2024
2 parents 4ee0655 + e6e4871 commit bec96ae
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 141 deletions.
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

0 comments on commit bec96ae

Please sign in to comment.