Repository navigation
Conversation
Resolves the TODO in tests/test_official/exceptions.py by folding the "Array of" type exceptions (previously keyed by (param_name, is_class)) into COMPLEX_TYPES, keyed by object name like the other entries. check_param_type now looks the exceptions up via extract_mappings. Behavior is unchanged: verified with a script comparing the old and new exception-path decisions for all 6200 (object, parameter) pairs of telegram.Bot methods and telegram classes, plus end-to-end check_param_type runs on the affected parameters.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #4324
Resolves the TODO in
tests/test_official/exceptions.pyby mergingParamTypeCheckingExceptions.ARRAY_OF_EXCEPTIONSintoCOMPLEX_TYPES(one unchecked item of the tracking issue).COMPLEX_TYPES, keyed by object name like all other entries, with string values that must be present in the parameter annotation.check_param_typeresolves them viaextract_mappings(PTCE.COMPLEX_TYPES, ...)with identical return semantics.Sequenceimport and the unreachable{"correct_option_ids": Sequence[int]}send_pollentry.Behavior-preserving: verified with a script comparing old vs new exception-path decisions for all 6200 (object, parameter) pairs of
telegram.Botmethods andtelegramclasses.ruff check,ruff format --checkandpy_compilepass.Use "Related to #4324" (NOT "Closes") since #4324 is a tracking issue with other unchecked items.