Fix: align error message with validation logic in _add_custom_tokens #422
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BUG FIX #421
Description
This PR corrects a minor inconsistency in the error message for custom token ID validation within the
_add_custom_tokensmethod.The validation logic correctly checks if an ID is within the range
[0, 98], but theValueErrormessage incorrectly stated the valid range was[1, 98]. This change updates the error message to match the actual validation logic, preventing potential confusion for developers.This is a static text change in an error message. I have manually reviewed the code to ensure the new message
...is not in [0, 98].accurately reflects the validation logicif i < 0 or i > 98:.