Skip to content

Support progress descriptions when progress bars are disabled - #574

Draft
sapunyangkut wants to merge 1 commit into
dfm:mainfrom
sapunyangkut:codex/fix-noop-progress-description
Draft

Support progress descriptions when progress bars are disabled#574
sapunyangkut wants to merge 1 commit into
dfm:mainfrom
sapunyangkut:codex/fix-noop-progress-description

Conversation

@sapunyangkut

Copy link
Copy Markdown

Summary

  • Add a tqdm-compatible no-op set_description method to _NoOpPBar.
  • Extend the disabled progress-bar test to cover the context manager, update, positional and keyword set_description calls, and silent output.

Motivation

When progress display is disabled, get_progress_bar returns _NoOpPBar. Callers using the common tqdm.set_description interface currently receive an AttributeError. This keeps the disabled path interface-compatible without rendering anything or adding a dependency.

Validation

  • python -m tox -e py312-extras — 130 passed
  • python -m tox -e lint — all hooks passed
  • python -m build --no-isolation . — sdist and wheel built successfully

Fixes #476

AI assistance disclosure

This contribution was prepared and validated with OpenAI Codex automation. The automation reproduced the failure on the current upstream commit, produced the two-file patch, and ran the checks listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add set_description to pbar._NoOpPBar

1 participant