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

Fix: Improved handling of place_correct_choice_position for flexibl… #1511

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

eliyahabba
Copy link
Collaborator

…e input sizes

  • Added logic to ensure place_correct_choice_position works correctly for varying numbers of choices.
  • Implemented two approaches:
    1. Clamping the position to ensure it remains within valid bounds.
    2. Supporting negative indexing to allow placing the correct choice at the end with -1.
  • Ensured the implementation avoids crashes and provides robust handling for edge cases.

…e input sizes

- Added logic to ensure `place_correct_choice_position` works correctly for varying numbers of choices.
- Implemented two approaches:
  1. Clamping the position to ensure it remains within valid bounds.
  2. Supporting negative indexing to allow placing the correct choice at the end with `-1`.
- Ensured the implementation avoids crashes and provides robust handling for edge cases.
@elronbandel elronbandel enabled auto-merge (squash) January 16, 2025 08:54
@elronbandel elronbandel disabled auto-merge January 16, 2025 08:54
@elronbandel elronbandel merged commit 347f6e1 into main Jan 16, 2025
15 of 16 checks passed
@elronbandel elronbandel deleted the fix/correct-choice-position-handling branch January 16, 2025 08:55
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