Repository navigation
Add python-gnupg stubs - #13465
Closed
lovetox wants to merge 2 commits into
Closed
Add python-gnupg stubs#13465lovetox wants to merge 2 commits into
lovetox wants to merge 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
srittau
requested changes
Feb 26, 2025
srittau
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, notes below. Also:
- Please add a comment for each
Anyexplaining the valid types. - Instance variables initialized in
__init__should be added to all classes. - Default values should be the actual default values, not
...(unless they are complex).
| __author__: str = ... | ||
| __date__: str = ... | ||
|
|
||
| from typing import Protocol |
Collaborator
There was a problem hiding this comment.
This should be combined with the imports above.
| logger: logging.Logger = ... | ||
| fsencoding: str = ... | ||
|
|
||
| UNSAFE: re.Pattern[Any] = ... |
Collaborator
There was a problem hiding this comment.
Considering this is only defined on some platforms, I would just add gnupg.UNSAFE to @tests/stubtest_allowlist.txt.
Comment on lines
+84
to
+85
| UID_INDEX: int = ... | ||
| FIELDS: list[str] = ... |
| FIELDS: list[str] = ... | ||
| def __init__(self, gpg: GPG) -> None: ... | ||
| def key(self, args: Any) -> None: ... | ||
| sec: Any = ... |
Collaborator
There was a problem hiding this comment.
Suggested change
| sec: Any = ... | |
| pub = key | |
| sec = key |
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
hugovk
reviewed
Oct 9, 2025
| @@ -0,0 +1,257 @@ | |||
| import logging | |||
| import re | |||
| from typing import Any | |||
Member
There was a problem hiding this comment.
Suggested change
| from typing import Any | |
| from typing import Any, Final |
Collaborator
|
Marking this as a draft for now since CI isn't passing and the review above needs to be addressed |
brianschubert
marked this pull request as draft
March 14, 2026 19:56
Contributor
Author
|
I dont want to follow up on this, thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.