Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

None values where warnings should be raised #20

@chrysn

Description

@chrysn

There were (and are) some places in the code where a TODO is indicated, but then the code just passes through without any visible action. Working with the library would be easier if in these places an exception would be raised, and (if things can contine, like when before #19 the signatures got checked, raise a clearly visible warning).

For example, when this returns in the error case

    def remote_pubkey(self) -> RPK:
        if self.cipher_suite.dh_curve in [X448, X25519]:
            return OKPKey(x=self.g_x, crv=self.cipher_suite.dh_curve)
        else:
            # TODO: implement NIST curves
            pass

then the error is not visible where it happens, but only much later when the implicitly returned None is actually used.

Feel free to close this if you consider it just a matter of different styles; I'd file fixes whenever I stumble upon such a case and refer back to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions