Skip to content

Commit

Permalink
Configure Precommit hooks with black and isort (#1416)
Browse files Browse the repository at this point in the history
* Precommit configured
* Updating flake8 limits and add isort to precommit
* Adding flake8 and configuration for isort
  • Loading branch information
vrdmr authored Jan 31, 2024
1 parent 535b3d9 commit c0a2c3c
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ exclude = .git, __pycache__, build, dist, .eggs, .github, .local, docs/,
tests/unittests/broken_functions/syntax_error/main.py,
.env*, .vscode, venv*, *.venv*

max-line-length = 80
max-line-length = 88
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile = black
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
Loading

0 comments on commit c0a2c3c

Please sign in to comment.