Skip to content

Conversation

@dgw
Copy link
Member

@dgw dgw commented Feb 1, 2025

Description

This makes rate limit feedback from the bot more readable. Fixes #2651.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make lint and make test)
  • I have tested the functionality of the things this change touches

This makes rate limit feedback from the bot more readable.

We could go full-on custom format, but honestly the built-in string
representation of a timedelta is perfectly serviceable if you get rid of
the microseconds portion. (How you get there is pretty ugly, but it's
not AS bad as a whole new helper function in `tools.time`.)
@dgw dgw added the Tweak label Feb 1, 2025
@dgw dgw added this to the 8.0.2 milestone Feb 1, 2025
@dgw dgw requested a review from a team February 1, 2025 01:46
Copy link
Contributor

@SnoopJ SnoopJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, I don't mind this solution as much when you format it across multiple lines like that. Nice tidy fix.

@dgw dgw merged commit 44bc866 into master Feb 1, 2025
17 checks passed
@dgw dgw deleted the rate-left-microseconds branch February 1, 2025 17:21
dgw added a commit that referenced this pull request Feb 1, 2025
bot: round rate limit `time_left` value up, eliminate microseconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rate limit remaining-time placeholders contain microseconds

4 participants