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

Ignore Seperator when calculating length of choices in select #335

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

weiduhuo
Copy link
Contributor

@weiduhuo weiduhuo commented Nov 12, 2023

What is the problem that this PR addresses?

Ignore Seperator when calculating length of choices in select so that we can make full use of the maximum number of keyboard shortcuts.

How did you solve it?

From

len(choices)

To

sum(1 for c in choices if not isinstance(c, Separator))

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

Copy link
Collaborator

@kiancross kiancross left a comment

Choose a reason for hiding this comment

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

This looks good, thanks!

For some reason, the CI checks have not run. Can you force-push the commit (might need to do git commit --amend first) to re-trigger the GitHub actions?

@weiduhuo weiduhuo force-pushed the bug_fix_choice_len branch from ee159aa to a56751e Compare January 9, 2024 05:50
@kiancross kiancross enabled auto-merge (squash) January 11, 2024 04:04
@kiancross kiancross merged commit ed4025c into tmbo:master Jan 11, 2024
30 checks passed
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.

2 participants