]> 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:00 +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

noxfile.py

index 9d59f9b6d239ee73fcdb2eb40d9b53637ccdc8ce..97cd30e8de0ee4ddac58429d6547879d28469dba 100644 (file)
@@ -11,6 +11,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"
@@ -368,6 +369,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",
@@ -387,5 +390,10 @@ def test_pep8(session: nox.Session) -> None:
         "python ./tools/cython_imports.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")