From 603569e321013a1a63a637813c94c2834d0a0023 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 16 Feb 2023 22:06:12 -0700 Subject: 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 --- share/spack/qa/flake8_formatter.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'share') 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) -- cgit v1.2.3-70-g09d2