File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,20 @@ isort provides official support for [pre-commit](https://pre-commit.com/).
7
7
8
8
To use isort's official pre-commit integration add the following config:
9
9
10
+ ``` yaml
11
+ - repo : https://github.com/pycqa/isort
12
+ rev : 5.9.3
13
+ hooks :
14
+ - id : isort
15
+ name : isort (python)
10
16
` ` `
17
+
18
+ under the ` repos` section of your projects `.pre-commit-config.yaml` file. Optionally if you want to have different hooks
19
+ over different file types (ex : python vs cython vs pyi) you can do so with the following config:
20
+
21
+ ` ` ` yaml
11
22
- repo: https://github.com/pycqa/isort
12
- rev: 5.8.0
23
+ rev: 5.9.3
13
24
hooks:
14
25
- id: isort
15
26
name: isort (python)
@@ -21,8 +32,6 @@ To use isort's official pre-commit integration add the following config:
21
32
types: [pyi]
22
33
` ` `
23
34
24
- under the ` repos ` section of your projects ` .pre-commit-config.yaml ` file.
25
-
26
35
# ## seed-isort-config
27
36
28
37
Older versions of isort used a lot of magic to determine import placement, that could easily break when running on CI/CD.
You can’t perform that action at this time.
0 commit comments