Skip to content

Add PEP 561 type stubs (.pyi) for oqs package #110

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

M-AlNoaimi
Copy link

This PR adds in PEP 561 compliant type stub files, enabling static type checking when using of liboqs-python directly.

Note: Initially, the fork started with a __init__.pyi but that would mean manually re-exporting (at least according to Mypy being set to strict), so leaving it out would give a bit more flexibility, but it can be added back if it's needed. 😄

The following files have been added:
- oqs/py.typed: Marker file for PEP 561 compliance.
- oqs/__init__.pyi: Stub for the main package entry point.
- oqs/oqs.pyi: Stubs for core OQS functionalities (KeyEncapsulation,
  Signature, related functions, and exceptions).
- oqs/rand.pyi: Stubs for random number generation functions.

Signed-off-by: M-AlNoaimi <[email protected]>
… attributes & Removed init stub to be more flexible (when making edits directly down the line).

Signed-off-by: M-AlNoaimi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant