-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix _is_str_kwarg_of for annotated parameters (#859)
**Pull Request Checklist** - [x] Fixes #855 - [x] Tests added - [x] Documentation/examples added - [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** Currently, annotations break the `_is_str_kwarg_of` function. Adds logic to check whether it's a built-in `str`, an `Annotated` str or a simple subclass of `str`. It also fixes/makes explicit the logic behind doing a json parse of the value if it is untyped. --------- Signed-off-by: Elliot Gunton <[email protected]>
- Loading branch information
1 parent
9940b48
commit 862c45b
Showing
3 changed files
with
151 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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