Skip to content

Commit

Permalink
build: configure isort to work with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
xenophonf committed Nov 30, 2023
1 parent c0ad352 commit 27f92b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
((python-mode . ((eval . (add-hook 'before-save-hook #'elpy-black-fix-code nil t)))))
((python-mode . ((eval . (progn
(add-hook 'before-save-hook #'py-isort-before-save nil t)
(add-hook 'before-save-hook #'elpy-black-fix-code nil t))))))
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ test = [
file = "README.md"
content-type = "text/markdown"

[tool.isort]
profile = "black"
skip_gitignore = true

[tool.pytest.ini_options]
# Invoke smoke tests with `pytest -k smoke`. See also
# https://docs.pytest.org/en/stable/mark.html,
Expand Down

0 comments on commit 27f92b9

Please sign in to comment.