rich icon indicating copy to clipboard operation
rich copied to clipboard

Update progress.py

Open TomerYogev opened this issue 4 weeks ago • 3 comments

Don't output extraneous blank line when progress display is disabled

Type of changes

  • [x] Bug fix
  • [ ] New feature
  • [ ] Documentation / docstrings
  • [ ] Tests
  • [ ] Other

AI?

  • [ ] AI was used to generate this PR

AI generated PRs may be accepted, but only if @willmcgugan has responded on an issue or discussion.

Checklist

  • [x] I've run the latest black with default args on new code.
  • [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate (see note about typos above).
  • [x] I've added tests for new code.
  • [x] I accept that @willmcgugan may be pedantic in the code review.

Description

When creating a Progress with disabled=True, it still outputs a blank line on non interactive consoles. This PR adds an if not self.disable to the stop function, symmetrically to the start function.

Important: Link to an issue or discussion regarding these changes.

https://github.com/Textualize/rich/issues/110

TomerYogev avatar Dec 03 '25 21:12 TomerYogev

Don't output extraneous blank line when progress display is disabled

Type of changes

  • [x] Bug fix
  • [ ] New feature
  • [ ] Documentation / docstrings
  • [ ] Tests
  • [ ] Other

AI?

  • [ ] AI was used to generate this PR

AI generated PRs may be accepted, but only if @willmcgugan has responded on an issue or discussion.

Checklist

  • [x] I've run the latest black with default args on new code.
  • [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate (see note about typos above).
  • [x] I've added tests for new code.
  • [x] I accept that @willmcgugan may be pedantic in the code review.

Description

When creating a Progress with disabled=True, it still outputs a blank line on non interactive consoles. This PR adds an if not self.disable to the stop function, symmetrically to the start function.

Important: Link to an issue or discussion regarding these changes.

https://github.com/Textualize/rich/issues/110

Domimueller85 avatar Dec 05 '25 11:12 Domimueller85

Don't output extraneous blank line when progress display is disabled

Type of changes

  • [x] Bug fix
  • [ ] New feature
  • [ ] Documentation / docstrings
  • [ ] Tests
  • [ ] Other

AI?

  • [ ] AI was used to generate this PR

AI generated PRs may be accepted, but only if @willmcgugan has responded on an issue or discussion.

Checklist

  • [x] I've run the latest black with default args on new code.
  • [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate (see note about typos above).
  • [x] I've added tests for new code.
  • [x] I accept that @willmcgugan may be pedantic in the code review.

Description

When creating a Progress with disabled=True, it still outputs a blank line on non interactive consoles. This PR adds an if not self.disable to the stop function, symmetrically to the start function.

Important: Link to an issue or discussion regarding these changes.

https://github.com/Textualize/rich/issues/110

Domimueller85 avatar Dec 05 '25 11:12 Domimueller85

@Domimueller85 Let me know if your comments were some kind of mistake. If I don't hear from you, I intend to ban you from the repo.

willmcgugan avatar Dec 05 '25 12:12 willmcgugan