summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2024-10-02 19:22:54 -0700
committerGitHub <noreply@github.com>2024-10-02 20:22:54 -0600
commit322a83c808ea572c37b70f2bec98962d39ef805d (patch)
treefd4418296971010d53b684578fa32a96caf81ab6
parentaa53007f82eab3183ff5d107e1de67daeb9bd20d (diff)
downloadspack-322a83c808ea572c37b70f2bec98962d39ef805d.tar.gz
spack-322a83c808ea572c37b70f2bec98962d39ef805d.tar.bz2
spack-322a83c808ea572c37b70f2bec98962d39ef805d.tar.xz
spack-322a83c808ea572c37b70f2bec98962d39ef805d.zip
style: fix black configuration (#46740)
We mostly use `spack style` and `spack style --fix`, but it's nice to also be able to run plain old `black .` in the repo. - [x] Fix includes and excludes `pyproject.toml` so that we *only* cover files we expect to be blackened. Note that `spack style` is still likely the better way to go, because it looks at `git status` and tells black to only check files that changed from `develop`. `black` with `pyproject.toml` won't do that. Of course, you can always manually specify which files you want blackened. Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
-rw-r--r--pyproject.toml13
1 files changed, 2 insertions, 11 deletions
diff --git a/pyproject.toml b/pyproject.toml
index d74b54270e..be97f0421e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -70,17 +70,8 @@ features = [
[tool.black]
line-length = 99
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
-include = '''
- \.pyi?$
-'''
-extend-exclude = '''
-/(
- \.git
- | \.mypy_cache
- | ^lib/spack/external/
- | ^opt/
-)/
-'''
+include = '(lib/spack|var/spack/repos)/.*\.pyi?$|bin/spack$'
+extend-exclude = 'lib/spack/external'
skip_magic_trailing_comma = true
[tool.isort]