Skip to content

Adding standard typing support#426

Open
Uspectacle wants to merge 10 commits intolibkeepass:masterfrom
Uspectacle:master
Open

Adding standard typing support#426
Uspectacle wants to merge 10 commits intolibkeepass:masterfrom
Uspectacle:master

Conversation

@Uspectacle
Copy link

Hello 👋

I'm proposing some typing support for the package.

Running pyright in standard mode leave no more errors.

I tried to change the execution as little as possible, but I had to fix some issues.

The test suite still works 100% after the edits, so I hope nothing broke silently 😅
I'm still very new to the open source process

Have a nice day ✨

Add type hints when necessary Unused loop variable in mds_rem replaced with _ to avoid warnings Moved import struct to the top of the file (was previously after the docstring)
Add type hints when necessary Add imports from typing IV is not a constant, so it was rename into iv (including in common.py) Bound i in CBC.update Raise an error is the mode is not implemented (everything except CBC) according to this issue: libkeepass#155
Add type hints when necessary Add imports from typing In DynamicDict desambigus l to item_key or items_list In Adapter classes rename data to obj and con to context to fit the parent class In compute_key_composite, use isinstance on keyfile instead of hasattr(keyfile, "read") and raise additionnal errors for "Meta/Version" There is still a lot of Any, this file should be updated when additionnal information are available.
Add type hints when necessary Add extra verification for nested gets Element.getchildren() is deprecated, use list(Element) instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant