Skip to content

Conversation

tconley1428
Copy link
Contributor

What was changed

Check for newtype before calling isinstance.

Why?

isinstance fails when the key_type is not a type.

Checklist

  1. Closes part of [Bug] value_to_type fails with custom string types as dictionary keys #1032

  2. How was this tested:
    New tests

  3. Any docs updates needed?

Copy link
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I did not consider the possibility of NewType in #833.

@tconley1428 tconley1428 merged commit bb90aab into main Aug 29, 2025
54 of 64 checks passed
@tconley1428 tconley1428 deleted the value_type_error branch August 29, 2025 16:20
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