Fix Type Annotations and Improve Stub Structure for pyrage-stubs #83
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.
Description:
This PR addresses several issues related to the type annotations and structure of the
pyrage-stubs
package. The following changes were made:Renamed
pyrage-stubs/pyrage-stubs
topyrage-stubs/pyrage
:pyrage-stubs
folder was renamed topyrage
inside thepyrage-stubs
directory to better align with the expected structure for a stubs-only package.Prefixed
_Identity
and_Recipient
as Internal Types:Identity
andRecipient
types were prefixed with an underscore (_Identity
,_Recipient
) to indicate that they are internal and not part of the public API.__all__
, ensuring they are not exposed when users import the package.Ensured
py.typed
is Present:py.typed
file was added to thepyrage
directory to signal to type checkers that the package is fully typed.Corrected
encrypt_io
params:out_io
param to this function.Why These Changes Were Made:
pyrage-stubs/pyrage-stubs
) was causing issues with type checkers not recognizing the stubs correctly. Renaming the folder topyrage
resolves this._Identity
and_Recipient
types were exposed in the public API, which could lead to confusion. By prefixing them with an underscore and excluding them from__all__
, we ensure they are used internally only.py.typed
file is necessary for type checkers likemypy
and Pyright to recognize the package as typed.Testing:
Notes:
pyrage-stubs
folder topyrage
inside thepyrage-stubs
directory is the only structural change that might need further discussion. This was done to align with the expected structure for stubs-only packages.Issue Reference:
Identity
andRecipient
Not Available at Runtime #81.