]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
collect pep8 errors
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 10 May 2026 15:30:00 +0000 (11:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 10 May 2026 15:30:35 +0000 (11:30 -0400)
run each command in a try/except (they print out error messages
regardless) and report at the end on all individual runs.

Change-Id: I347c04f5c49c69daadf9f5f9e7c6c488cdf27f35
(cherry picked from commit 3c650cede44e74b0a1939652034debc9fa74759c)

noxfile.py

index ccda69e37ac99a044e02b1c6bb93a1703ec0937c..8dba5596a96f8f5690593c565ff18c618b0f6462 100644 (file)
@@ -10,6 +10,7 @@ from typing import List
 from typing import Set
 
 import nox
+from nox.command import CommandFailed
 
 if sys.version_info > (3, 12):
     nox.needs_version = ">=2025.10.16"
@@ -373,6 +374,8 @@ def test_pep8(session: nox.Session) -> None:
 
     session.install(*nox.project.dependency_groups(pyproject, "lint"))
 
+    failed = []
+
     for cmd in [
         "flake8p ./lib/ ./test/ ./examples/ noxfile.py "
         "setup.py doc/build/conf.py",
@@ -391,5 +394,10 @@ def test_pep8(session: nox.Session) -> None:
         "python ./tools/normalize_file_headers.py --check",
         "python ./tools/walk_packages.py",
     ]:
+        try:
+            session.run(*cmd.split())
+        except CommandFailed as err:
+            failed.append((cmd, err))
 
-        session.run(*cmd.split())
+    if failed:
+        session.error(f"failed with {len(failed)} errors")