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

lint fails on main #1014

Closed
jku opened this issue May 13, 2024 · 2 comments · Fixed by #1013
Closed

lint fails on main #1014

jku opened this issue May 13, 2024 · 2 comments · Fixed by #1013
Labels
bug Something isn't working

Comments

@jku
Copy link
Member

jku commented May 13, 2024

sigstore/dsse.py:191: error: Unused "type: ignore" comment  [unused-ignore]
sigstore/dsse.py:220: error: Argument "keyid" to "Signature" has incompatible type "None"; expected "str"  [arg-type]
sigstore/dsse.py:249: error: Unused "type: ignore" comment  [unused-ignore]
sigstore/_internal/trustroot.py:111: error: Argument 1 to "load_der_public_key" has incompatible type "bytes | None"; expected "bytes"  [arg-type]
sigstore/_internal/trustroot.py:115: error: Argument 1 to "load_der_public_key" has incompatible type "bytes | None"; expected "bytes"  [arg-type]
sigstore/models.py:246: error: Argument "inclusion_promise" to "TransparencyLogEntry" has incompatible type "InclusionPromise | None"; expected "InclusionPromise"  [arg-type]
sigstore/models.py:498: error: Unused "type: ignore" comment  [unused-ignore]

This related to sigstore-protobuf 0.3.2 release. nothing much seems to have changed in the release but py.typed was added

@jku jku added the bug Something isn't working label May 13, 2024
@jku
Copy link
Member Author

jku commented May 13, 2024

Other issues seem like trivial fixes but this is a bit strange:
dsse.py:220: error: Argument "keyid" to "Signature" has incompatible type "None"; expected "str" [arg-type]

keyid is documented as optional but is not actually annotated as such: https://github.com/sigstore/protobuf-specs/blob/2c9be05fb6720b5e07b5c96e99524abed9e0d14b/protos/envelope.proto#L51

Filing an issue in protobuf seems appropriate but I think we'll just have to live ẃith a non-optional keyid in this code base as well?

@jku
Copy link
Member Author

jku commented May 13, 2024

@jku jku linked a pull request May 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant