8000 TTY_INTERACTIVE env var by willmcgugan · Pull Request #3777 · Textualize/rich · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TTY_INTERACTIVE env var #3777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

TTY_INTERACTIVE env var #3777

wants to merge 2 commits into from

Conversation

wi
8000
llmcgugan
Copy link
Member
@willmcgugan willmcgugan commented Jun 20, 2025

Adds a TTY_INTERACTIVE to disable things like progress bar / status spinners in CI

This adds to the new TTY_COMPATIBLE which enables styles even when the file is not technically a tty, as is the case in Github Actions. TTY_INTERACTIVE=0 will remove superfluous animations and progress bars in the CI output.

@codecov-commenter
Copy link
codecov-commenter commented Jun 20, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.85%. Comparing base (225cb07) to head (8cd7450).
Report is 74 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3777      +/-   ##
==========================================
- Coverage   98.24%   97.85%   -0.40%     
==========================================
  Files          74       74              
  Lines        8105     8142      +37     
==========================================
+ Hits         7963     7967       +4     
- Misses        142      175      +33     
Flag Coverage Δ
unittests 97.85% <100.00%> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@15r10nk
Copy link
15r10nk commented Jun 21, 2025

I assumed that this option had something to do with interactive terminals, where you can not read from stdin. But, If I understand you correct, you are still able to read user input, even when TTY_INTERACTIVE=0 is enabled.

Maybe call it TTY_ANIMATION=0

@willmcgugan
Copy link
Member Author

It echos an existing attribute in Rich. In that context interactive means somebody (i.e. a human) is interacting with the terminal, as apposed to running on CI. You are still able to read input, but reading from stdin doesn't always requires a human operator.

It does disable animation, but the flag in Rich has broader meaning.

It could also be RICH_INTERACTIVE. Perhaps the namespace would avoid any confusion?

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.

3 participants
0