btclib-org / btclib

btclib: a python3 library for 'bitcoin cryptography'
https://btclib.org
MIT License
100 stars 40 forks source link

moved to secp256k1 (Sourcery refactored) #93

Closed sourcery-ai[bot] closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Pull Request #91 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the secp256k1 branch, then run:

git fetch origin sourcery/secp256k1
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.01%.

Quality metrics Before After Change
Complexity 3.96 ⭐ 3.96 ⭐ 0.00
Method Length 161.93 😞 161.80 😞 -0.13 👍
Working memory 7.43 🙂 7.43 🙂 0.00
Quality 62.67% 🙂 62.68% 🙂 0.01% 👍
Other metrics Before After Change
Lines 409 409 0
Changed files Quality Before Quality After Quality Change
tests/ec/test_curve.py 62.67% 🙂 62.68% 🙂 0.01% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
tests/ec/test_curve.py test_symmetry 13 🙂 395 ⛔ 11 😞 36.85% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/ec/test_curve.py test_assorted_mult 3 ⭐ 346 ⛔ 13 😞 43.78% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/ec/test_curve.py test_secp256k1_py_vectors 4 ⭐ 159 😞 6 ⭐ 67.10% 🙂 Try splitting into smaller methods
tests/ec/test_curve.py test_exceptions 0 ⭐ 327 ⛔ 3 ⭐ 69.35% 🙂 Try splitting into smaller methods
tests/ec/test_curve.py test_negate 1 ⭐ 134 😞 5 ⭐ 75.34% ⭐ Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!