Skip to content

Commit

Permalink
build: add pre-commit files (#105)
Browse files Browse the repository at this point in the history
add pre-commit-config.yaml and pre-commit as a dependency
  • Loading branch information
sudarshanv01 authored Aug 3, 2023
1 parent a55805b commit b4f74e3
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ black src tests
isort src tests
~~~
before committing the code. This will autoformat your code and sort the import
statements in a consistent order.
statements in a consistent order. If you would like this code formatting to be done
along with each commit, you can run
~~~shell
pre-commit install
~~~

## Contributing to py4vasp

Expand Down
170 changes: 169 additions & 1 deletion poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ hypothesis = ">=6.48.1"
black = ">=22.6.0"
isort = ">=5.10.1"
ipykernel = ">=6.25.0"
pre-commit = ">=3.3.3"

[tool.poetry.group.doc.dependencies]
sphinx = ">=5.0.2"
Expand Down

0 comments on commit b4f74e3

Please sign in to comment.