diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2021-07-05 21:43:52 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2022-07-31 13:29:20 -0700 |
commit | 67d27841ae796f02bce3efa465d20211f5f3f084 (patch) | |
tree | 9c315560e8a1a1edecc15a334a7ed48ae1488398 /.github/workflows/windows_python.yml | |
parent | ec879240396b457f8bf05361a7d55280e0fa19fb (diff) | |
download | spack-67d27841ae796f02bce3efa465d20211f5f3f084.tar.gz spack-67d27841ae796f02bce3efa465d20211f5f3f084.tar.bz2 spack-67d27841ae796f02bce3efa465d20211f5f3f084.tar.xz spack-67d27841ae796f02bce3efa465d20211f5f3f084.zip |
black: configuration
This adds necessary configuration for flake8 and black to work together.
This also sets the line length to 99, per the data here:
* https://github.com/spack/spack/pull/24718#issuecomment-876933636
Given the data and the spirit of black's 88-character limit, we set the limit to 99
characters for all of Spack, because:
* 99 is one less than 100, a nice round number, and all lines will fit in a
100-character wide terminal (even when the text editor puts a \ at EOL).
* 99 is just past the knee the file size curve for packages, and it means that packages
remain readable and not significantly longer than they are now.
* It doesn't seem to hurt core -- files in core might change length by a few percent but
seem like they'll be mostly the same as before -- just a bit more roomy.
- [x] set line length to 99
- [x] remove most exceptions from `.flake8` and add the ones black cares about
- [x] add `[tool.black]` to `pyproject.toml`
- [x] make `black` run if available in `spack style --fix`
Co-Authored-By: Tom Scogland <tscogland@llnl.gov>
Diffstat (limited to '.github/workflows/windows_python.yml')
-rw-r--r-- | .github/workflows/windows_python.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/windows_python.yml b/.github/workflows/windows_python.yml index d33c624376..44da541ca1 100644 --- a/.github/workflows/windows_python.yml +++ b/.github/workflows/windows_python.yml @@ -46,7 +46,7 @@ jobs: python-version: 3.9 - name: Install Python packages run: | - python -m pip install --upgrade pip six setuptools flake8 isort>=4.3.5 mypy>=0.800 black pywin32 types-python-dateutil + python -m pip install --upgrade pip six setuptools flake8 "isort>=4.3.5" "mypy>=0.800" "click==8.0.4" "black<=21.12b0" pywin32 types-python-dateutil - name: Create local develop run: | .\spack\.github\workflows\setup_git.ps1 @@ -190,4 +190,4 @@ jobs: $proc = Start-Process ${{ env.spack_installer }}\spack.msi "/quiet" -Passthru $handle = $proc.Handle # cache proc.Handle $proc.WaitForExit(); - $LASTEXITCODE
\ No newline at end of file + $LASTEXITCODE |