rich icon indicating copy to clipboard operation
rich copied to clipboard

REQUEST-3385 add timeout to prompt.ask

Open miloszmat123 opened this issue 10 months ago • 1 comments

Type of changes

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

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.
  • [x] I've added tests for new code.
  • [x] I accept that @willmcgugan may be pedantic in the code review.

Description

Add optional argument timeout to the ask method in Prompt class.

After timeout message Prompt timed out! will be printed, and default value will be used or empty string

Issue: #3385

miloszmat123 avatar Jan 22 '25 15:01 miloszmat123

I would also love to have this feature.

BoPeng avatar Mar 01 '25 23:03 BoPeng