Skip to content

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

Closed
M-AlNoaimi wants to merge 2 commits into
open-quantum-safe:mainfrom
M-AlNoaimi:main
Closed

Add PEP 561 type stubs (.pyi) for oqs package#110
M-AlNoaimi wants to merge 2 commits into
open-quantum-safe:mainfrom
M-AlNoaimi:main

Conversation

@M-AlNoaimi
Copy link
Copy Markdown
Contributor

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 <26318936+M-AlNoaimi@users.noreply.github.com>
… attributes & Removed init stub to be more flexible (when making edits directly down the line).

Signed-off-by: M-AlNoaimi <26318936+M-AlNoaimi@users.noreply.github.com>
@dstebila dstebila requested a review from vsoftco May 23, 2025 13:24
@M-AlNoaimi M-AlNoaimi closed this by deleting the head repository Aug 9, 2025
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