-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update package tooling and boilerplate
This change updates our tooling to make a few changes and updates: - Use Ruff exclusively for formatting, linting, and import-sorting. Ruff can replace Black and isort, and is faster. - Add Bandit for static security analysis. - Move to pyproject.toml - Add setuptools_scm for versioning. This will mean we don't have to manually update a version number in pyproject.toml. - Run `ruff check --fix` for linting fixes - Updates our officially supported versions of Django, Wagtail, and Django-Flags to the most recent versions
- Loading branch information
1 parent
7064796
commit 67bf208
Showing
5 changed files
with
96 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
args: ["wagtailinventory", "setup.py", "--line-length=79"] | ||
exclude: migrations | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.2.2 | ||
hooks: | ||
- id: ruff | ||
exclude: migrations | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: ["wagtailinventory"] | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.5.0 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: ['--fix'] | ||
# Run the formatter. | ||
- id: ruff-format | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.8 | ||
hooks: | ||
- id: bandit | ||
args: ['-c', 'pyproject.toml', '--recursive'] | ||
additional_dependencies: ['bandit[toml]'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters