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
This commit is contained in:
Adam J. Stewart
2023-02-16 22:06:12 -07:00
committed by GitHub
parent b935809948
commit 603569e321
510 changed files with 864 additions and 3856 deletions

View File

@@ -17,14 +17,9 @@
# 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 @@ def __init__(self, options):
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 @@ def beginning(self, filename):
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 @@ def handle(self, error): # type: (Violation) -> None
:param error:
This will be an instance of
:class:`~flake8.style_guide.Violation`.
:type error:
flake8.style_guide.Violation
"""
# print(error.code)