Added typing to improve the use of the library (#1)#28
Open
zbalkan wants to merge 1 commit into
Open
Conversation
These changes require moving to Python 3.9 for `pymerkle` library. The `profiler` already required Python 3.10. For details, see the vermin results: ```bash $ vermin --target=3.7 --violations --backport argparse --backport typing --eval-annotations --no-parse-comments .\ Detecting python files.. Analyzing 28 files using 8 processes.. !2, 3.8 D:\Repos\pymerkle\benchmarks\conftest.py 'typing.Final' member requires 2.7, 3.8 final variable annotations require !2, 3.8 !2, 3.9 D:\Repos\pymerkle\benchmarks\init_db.py 'typing.Final' member requires 2.7, 3.8 builtin generic type annotation (dict[..]) requires !2, 3.9 builtin generic type annotation (list[..]) requires !2, 3.9 final variable annotations require !2, 3.8 !2, 3.9 D:\Repos\pymerkle\benchmarks\test_perf.py builtin generic type annotation (dict[..]) requires !2, 3.9 !2, 3.10 D:\Repos\pymerkle\profiler\__main__.py 'typing.Final' member requires 2.7, 3.8 builtin generic type annotation (dict[..]) requires !2, 3.9 builtin generic type annotation (tuple[..]) requires !2, 3.9 final variable annotations require !2, 3.8 pattern matching requires !2, 3.10 !2, 3.9 D:\Repos\pymerkle\pymerkle\concrete\inmemory.py 'typing.Literal' member requires 2.7, 3.8 builtin generic type annotation (list[..]) requires !2, 3.9 builtin generic type annotation (tuple[..]) requires !2, 3.9 literal variable annotations require !2, 3.8 !2, 3.9 D:\Repos\pymerkle\pymerkle\concrete\sqlite.py builtin generic type annotation (list[..]) requires !2, 3.9 builtin generic type annotation (tuple[..]) requires !2, 3.9 !2, 3.9 D:\Repos\pymerkle\pymerkle\constants.py builtin generic type annotation (list[..]) requires !2, 3.9 !2, 3.9 D:\Repos\pymerkle\pymerkle\core.py builtin generic type annotation (collections.deque[..]) requires !2, 3.9 builtin generic type annotation (list[..]) requires !2, 3.9 builtin generic type annotation (tuple[..]) requires !2, 3.9 !2, 3.8 D:\Repos\pymerkle\pymerkle\hasher.py 'typing.Literal' member requires 2.7, 3.8 literal variable annotations require !2, 3.8 !2, 3.9 D:\Repos\pymerkle\pymerkle\proof.py builtin generic type annotation (dict[..]) requires !2, 3.9 builtin generic type annotation (list[..]) requires !2, 3.9 builtin generic type annotation (tuple[..]) requires !2, 3.9 !2, 3.9 D:\Repos\pymerkle\pymerkle\utils.py builtin generic type annotation (list[..]) requires !2, 3.9 !2, 3.9 D:\Repos\pymerkle\tests\conftest.py 'typing.Final' member requires 2.7, 3.8 builtin generic type annotation (type[..]) requires !2, 3.9 final variable annotations require !2, 3.8 Tips: - You're using potentially backported modules: typing_extensions If so, try using the following for better results: --backport typing_extensions (disable using: --no-tips) Minimum required versions: 3.10 Incompatible versions: 2 Target versions not met: 3.7 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These changes require moving to Python 3.9 for
pymerklelibrary. Theprofileralready required Python 3.10.For details, see the vermin results: