This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 579c4b5c59 Remove build errors output from spellcheck-only output 
(#36648)
579c4b5c59 is described below

commit 579c4b5c59e3855dd1285cbfe482f41c57b2b82e
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Jan 7 17:02:48 2024 +0100

    Remove build errors output from spellcheck-only output (#36648)
    
    After #36591 has been implemented, in cas of `--spellcheck-only` checks
    for parallel packages, it might be that some build errors remain in
    build errors output (depends on some race conditions while parallel
    build of packages). Those errors, however, are not interesting to us -
    we are only interested in spellcheck errors (and possibly we want to
    know if there were also build errors but we are not interested in
    details.
    
    This PR clears up build errors in case of --spellcheck-only builds.
---
 docs/build_docs.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/docs/build_docs.py b/docs/build_docs.py
index 49f1708750..552f94e254 100755
--- a/docs/build_docs.py
+++ b/docs/build_docs.py
@@ -411,12 +411,17 @@ def display_packages_summary(
 def print_build_errors_and_exit(
     build_errors: dict[str, list[DocBuildError]],
     spelling_errors: dict[str, list[SpellingError]],
+    spellcheck_only: bool,
 ) -> None:
     """Prints build errors and exists."""
     if build_errors or spelling_errors:
         if build_errors:
-            display_errors_summary(build_errors)
-            console.print()
+            if spellcheck_only:
+                console.print("f[warning]There were some build errors 
remaining.")
+                console.print()
+            else:
+                display_errors_summary(build_errors)
+                console.print()
         if spelling_errors:
             display_spelling_error_summary(spelling_errors)
             console.print()
@@ -555,6 +560,7 @@ def main():
     print_build_errors_and_exit(
         all_build_errors,
         all_spelling_errors,
+        spellcheck_only,
     )
 
 

Reply via email to