Skip to content

Commit 1792a7a

Browse files
committed
Add isort config
1 parent 29dcb5c commit 1792a7a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@ repos:
4141
"--skip",
4242
"doc/users/project/credits.rst"
4343
]
44+
45+
- repo: https://github.com/pycqa/isort
46+
rev: 5.12.0
47+
hooks:
48+
- id: isort
49+
name: isort (python)
50+
files: ^tutorials/|^examples/

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@ requires = [
66
"pybind11>=2.6",
77
"setuptools_scm>=7",
88
]
9+
10+
11+
[tool.isort]
12+
known_mpltoolkits = "mpl_toolkits"
13+
known_pydata = "numpy, matplotlib.pyplot"
14+
known_firstparty = "matplotlib"
15+
sections = "FUTURE,STDLIB,THIRDPARTY,PYDATA,FIRSTPARTY,MPLTOOLKITS,LOCALFOLDER"
16+
no_lines_before = "MPLTOOLKITS"
17+
force_sort_within_sections = true

0 commit comments

Comments
 (0)