docs/build_docs.py
print(f" - {pkg}")
    docs_only = args.docs_only
    spellcheck_only = args.spellcheck_only
    disable_checks = args.disable_checks
    package_filters = args.package_filter
    print("Current package filters: ", package_filters)
    current_packages = (
        [p for p in available_packages if any(fnmatch.fnmatch(p, f) for f in package_filters)]
        if package_filters
        else available_packages
    )
    with with_group(f"Documentation will be built for {len(current_packages)} package(s)"):
        for pkg in current_packages:
            print(f" - {pkg}")
    all_build_errors: Dict[Optional[str], List[DocBuildError]] = {}
    all_spelling_errors: Dict[Optional[str], List[SpellingError]] = {}
    package_build_errors, package_spelling_errors = build_docs_for_packages(
        current_packages=current_packages,
        docs_only=docs_only,
        spellcheck_only=spellcheck_only,
    )
    if package_build_errors:
        all_build_errors.update(package_build_errors)
    if package_spelling_errors:
        all_spelling_errors.update(package_spelling_errors)
    to_retry_packages = [
        package_name
        for package_name, errors in package_build_errors.items()
        if any(any((m in e.message) for m in ERRORS_ELIGIBLE_TO_REBUILD) for e in errors)
    ]