-
Notifications
You must be signed in to change notification settings - Fork 51
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
Beautify code #97
base: main
Are you sure you want to change the base?
Beautify code #97
Conversation
66a243d
to
36be44b
Compare
Add typing Add pre-commit Reformat code Make code more secure Update workflow python_simplified.yml Update workflow python_detailed.yml Signed-off-by: andrew000 <[email protected]>
36be44b
to
e1a6fc7
Compare
Bump deps Signed-off-by: andrew000 <[email protected]>
I will merge this after 0.12 release (later this week) |
981bf5c
to
7906e78
Compare
@andrew000 We've released 0.12. Updated the default examples to use ML-KEM/DSA. Please feel free to resolve the other conflicts then we can merge the PR. |
I will resolve conflicts later this week |
# Conflicts: # examples/kem.py # examples/sig.py # oqs/oqs.py # oqs/rand.py # pyproject.toml # tests/test_kem.py # tests/test_sig.py
Bump deps Signed-off-by: andrew000 <[email protected]>
Add stream handler to logger Signed-off-by: andrew000 <[email protected]>
Signed-off-by: andrew000 <[email protected]>
Signed-off-by: andrew000 <[email protected]>
@andrew000 Thanks, I will review shortly and merge |
@andrew000 I think we need something like Alternatively, keep the good ol' |
@andrew000 I've modified the examples (see the last commit). Let me know if this looks OK for you, and I'll merge the PR. |
Tonight I will review the changes and fix some things if I find anything. |
@andrew000 I'm getting some Pyright type errors for
I guess it's the static type checker being unhappy, but I'm not too familiar with types in Python. Any clues? |
https://docs.python.org/3/library/ctypes.html#ctypes.Structure
|
Signed-off-by: andrew000 <[email protected]>
LGTM. I have updated So I think PR is ready to be merged 👍 |
Documentation does not provide any detailed type hints.
class _StructUnionMeta(_CDataMeta):
_fields_: Sequence[tuple[str, type[_CData]] | tuple[str, type[_CData], int]] But Finally we can try change |
Signed-off-by: andrew000 <[email protected]>
UV
; https://docs.astral.sh/uvMyPy
ruff
pre-commit
ruff
os.path
,os.system
)python_simplified.yml
python_detailed.yml
Drop workflow python version from 3.10 to 3.9 to be sure that the library will work on py3.9+. Also, I want to add
matrix
to test the library on 3.9, 3.10, 3.11, 3.12, 3.13, but I don't see anything deprecated in 3.9 that can't be in 3.13 in this code.