summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2023-02-16 22:06:12 -0700
committerGitHub <noreply@github.com>2023-02-16 23:06:12 -0600
commit603569e321013a1a63a637813c94c2834d0a0023 (patch)
tree366d3ba04458bb748c1f494e270401a56c10a7f2 /share
parentb9358099488b6c9851e28ca912c8be246178974a (diff)
downloadspack-603569e321013a1a63a637813c94c2834d0a0023.tar.gz
spack-603569e321013a1a63a637813c94c2834d0a0023.tar.bz2
spack-603569e321013a1a63a637813c94c2834d0a0023.tar.xz
spack-603569e321013a1a63a637813c94c2834d0a0023.zip
Style: black 23, skip magic trailing comma (#35351)
* Style: black 23, skip magic trailing commas * isort should use same line length as black * Fix unused import * Update version of black used in CI * Update new packages * Update new packages
Diffstat (limited to 'share')
-rw-r--r--share/spack/qa/flake8_formatter.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/share/spack/qa/flake8_formatter.py b/share/spack/qa/flake8_formatter.py
index 93cb4cf3fb..b05dc8f4a1 100644
--- a/share/spack/qa/flake8_formatter.py
+++ b/share/spack/qa/flake8_formatter.py
@@ -17,14 +17,9 @@ pattern_exemptions = {
# exemptions applied only to package.py files.
r"package.py$": {
# Allow 'from spack.package import *' in packages, but no other wildcards
- "F403": [
- r"^from spack.package import \*$",
- r"^from spack.package_defs import \*$",
- ],
+ "F403": [r"^from spack.package import \*$", r"^from spack.package_defs import \*$"],
# Exempt '@when' decorated functions from redefinition errors.
- "F811": [
- r"^\s*@when\(.*\)",
- ],
+ "F811": [r"^\s*@when\(.*\)"],
},
# exemptions applied to all files.
r".py$": {
@@ -52,7 +47,7 @@ class SpackFormatter(Pylint):
self.error_seen = False
super().__init__(options)
- def after_init(self): # type: () -> None
+ def after_init(self) -> None:
"""Overriding to keep format string from being unset in Default"""
pass
@@ -65,7 +60,7 @@ class SpackFormatter(Pylint):
for code, pat_arr in errors.items():
self.spack_errors[code].extend(pat_arr)
- def handle(self, error): # type: (Violation) -> None
+ def handle(self, error: Violation) -> None:
"""Handle an error reported by Flake8.
This defaults to calling :meth:`format`, :meth:`show_source`, and
@@ -75,8 +70,6 @@ class SpackFormatter(Pylint):
:param error:
This will be an instance of
:class:`~flake8.style_guide.Violation`.
- :type error:
- flake8.style_guide.Violation
"""
# print(error.code)