Fix KeyError in _validate_and_extract_signature_types and Add Tests for Pydantic Actions #403
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.
PR fixes a
KeyError
issue in_validate_and_extract_signature_types
when the"state"
key is missing in type hints. It also has error handling and adds unit tests.Changes
_validate_and_extract_signature_types
to use.get()
test_burr_pydantic.py
.How I tested this
Added new tests for both error and success cases. Below are the test details:
Notes
ensures better debugging and avoids cryptic errors , closed #385
Checklist
Important
Fix
KeyError
in_validate_and_extract_signature_types
and add tests for Pydantic actions.KeyError
in_validate_and_extract_signature_types
inpydantic.py
by using.get()
for "state" key.test_burr_pydantic.py
for_validate_and_extract_signature_types
to cover missing "state" key and incorrect return types.test_burr_pydantic.py
with valid logic for testing.This description was created by for 5a91b6b. It will automatically update as commits are pushed.