Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect subclass check for secretstr #6730

Commits on Jul 18, 2023

  1. Copy the full SHA
    f4f35a9 View commit details
    Browse the repository at this point in the history
  2. 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.
    AlexVndnblcke committed Jul 18, 2023
    Copy the full SHA
    c6a25ad View commit details
    Browse the repository at this point in the history