Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow subclasses of
SecretStr
to expect str
Currently subclasses of SecretStr fail to evaluate `self.field_type is SecretStr` and default to `bytes_type`. This is not how it should go as the subclass explicitly subclasses the SecretStr type. This fix tests if the type is of SecretStr with `issubclass` which states: > A class is considered a subclass of itself Which makes is backwards compatible for the actual SecretStr as well.
- Loading branch information