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

Adding pre commit #220

Merged
merged 10 commits into from
Feb 15, 2024
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
emarondan marked this conversation as resolved.
Show resolved Hide resolved
hooks:
- id: bandit
args: [-r, -c, .bandit.yml]
language_version: python3.8
emarondan marked this conversation as resolved.
Show resolved Hide resolved
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
emarondan marked this conversation as resolved.
Show resolved Hide resolved
hooks:
- id: flake8
language_version: python3.8
- repo: https://github.com/psf/black.git
rev: 23.1.0
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
emarondan marked this conversation as resolved.
Show resolved Hide resolved
language_version: python3.8
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py38, py39, py310, py311, py312, pypy3, docs, security, flake8, pylint, black, typing
envlist = py38, py39, py310, py311, py312, pypy3, docs, security, flake8, pylint, black, typing, pre-commit
emarondan marked this conversation as resolved.
Show resolved Hide resolved

[testenv]
deps =
emarondan marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -57,3 +57,8 @@ changedir = docs
deps = -rdocs/requirements.txt
commands =
sphinx-build -W -b html . {envtmpdir}/html

[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true