summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
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)