Skip to content
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

Tweak progress bar docs. #3286

Merged
merged 5 commits into from
Sep 20, 2023
Merged

Tweak progress bar docs. #3286

merged 5 commits into from
Sep 20, 2023

Commits on Sep 12, 2023

  1. Tweak progress bar docs.

    There is no good reason as to why the progress bar can't be set back to its indeterminate state (and you could actually do it with code) so this removes the docstring that says that a progress bar can't go back to its indeterminate state.
    
    Related issue: #3268
    Related Discord message: https://discord.com/channels/1026214085173461072/1033754296224841768/1149742624002023594
    rodrigogiraoserrao committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    e061f73 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2023

  1. Use a special sentinal in ProgressBar.update

    To comply with #3286 (review) we create a new type around a sentinel object and check whether we're using the sentinel before modifying the progress bar reactives.
    
    Things that didn't quite work well:
    - directly checking 'if parameter is not _sentinel:' won't satisfy type checkers because that condition doesn't restrict the type of 'parameter' to _not_ be 'UnsetParameter'.
    - checking 'isinstance(parameter, float)' isn't enough because the user may call the method with an integer like '3' and then the isinstance check would fail.
    
    - checking 'isinstance(parameter, (int, float))' works but looks a bit odd, plus it is not very general.
    rodrigogiraoserrao committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    684b38a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e46015a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65a7f1e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2288f3d View commit details
    Browse the repository at this point in the history