Skip to content

Commit c0a2c3c

Browse files
authored
Configure Precommit hooks with black and isort (Azure#1416)
* Precommit configured * Updating flake8 limits and add isort to precommit * Adding flake8 and configuration for isort
1 parent 535b3d9 commit c0a2c3c

File tree

4 files changed

+162
-123
lines changed

4 files changed

+162
-123
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ exclude = .git, __pycache__, build, dist, .eggs, .github, .local, docs/,
1212
tests/unittests/broken_functions/syntax_error/main.py,
1313
.env*, .vscode, venv*, *.venv*
1414

15-
max-line-length = 80
15+
max-line-length = 88

.isort.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
profile = black

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 24.1.1
4+
hooks:
5+
- id: black
6+
language_version: python3
7+
- repo: https://github.com/PyCQA/isort
8+
rev: 5.12.0
9+
hooks:
10+
- id: isort
11+
- repo: https://github.com/PyCQA/flake8
12+
rev: 7.0.0
13+
hooks:
14+
- id: flake8

0 commit comments

Comments
 (0)