Skip to content

Commit

Permalink
precommit: add pyproject's hooks (#1412)
Browse files Browse the repository at this point in the history
* precommit: add `pyproject`'s hooks

* apply precommit

* Update dev_config/python/.pre-commit-config.yaml

---------

Co-authored-by: Engel Nyst <[email protected]>
Co-authored-by: Robert Brennan <[email protected]>
  • Loading branch information
3 people committed Apr 29, 2024
1 parent 1597f00 commit 46bd836
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dev_config/python/.pre-commit-config.yaml
Expand Up @@ -7,6 +7,16 @@ repos:
- id: check-yaml
- id: debug-statements

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: validate-pyproject


- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Expand Up @@ -49,8 +49,10 @@ pytest-asyncio = "*"
torch = "2.2.2"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = [
"poetry-core",
]

[tool.autopep8]
# autopep8 fights with mypy on line length issue
Expand Down

0 comments on commit 46bd836

Please sign in to comment.