Skip to content

CertTypes keyfile and password should be Optional types. #1502

Closed

Description

@decaz

SSLContext.load_cert_chain can take None as arguments values (docs) so I guess this:

CertTypes = Union[str, Tuple[str, str], Tuple[str, str, str]]

should be rewritten as follows:

CertTypes = Union[str, Tuple[str, Optional[str]], Tuple[str, Optional[str], Optional[str]]] 

Activity

  1. changed the title [-]Fix CertTypes[/-] [+]Incorrect CertTypes[/+] on Mar 9, 2021
  2. florimondmanca commented on Mar 9, 2021

    @florimondmanca
    Contributor

    Hi,

    Sounds legit, happy to review PRs towards that. :)

  3. johtso commented on Mar 9, 2021

    @johtso
    Contributor

    Feel like a type definition like that would be more readable broken over multiple lines, so many square brackets!

  4. changed the title [-]Incorrect CertTypes[/-] [+]CertTypes `keyfile` and `password` should be Optional types.[/+] on Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    user-experienceEnsuring that users have a good experience using the library

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions