btclib-org / btclib

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

Documentation #96

Closed fametrano closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.07%.

Quality metrics Before After Change
Complexity 9.87 🙂 9.95 🙂 0.08 👎
Method Length 79.57 🙂 78.64 🙂 -0.93 👍
Working memory 9.40 🙂 9.38 🙂 -0.02 👍
Quality 60.78% 🙂 60.71% 🙂 -0.07% 👎
Other metrics Before After Change
Lines 410 419 9
Changed files Quality Before Quality After Quality Change
setup.py 74.73% 🙂 74.61% 🙂 -0.12% 👎
btclib/amount.py 86.30% ⭐ 86.30% ⭐ 0.00%
btclib/ec/curve_group_2.py 49.29% 😞 49.29% 😞 0.00%
docs/source/conf.py 91.68% ⭐ 93.90% ⭐ 2.22% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
btclib/ec/curve_group_2.py mult_sliding_window 26 😞 220 ⛔ 15 😞 27.37% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
btclib/ec/curve_group_2.py mult_w_NAF 10 🙂 202 😞 11 😞 46.65% 😞 Try splitting into smaller methods. Extract out complex expressions
btclib/ec/curve_group_2.py multiplier_decomposer 1 ⭐ 113 🙂 10 😞 66.27% 🙂 Extract out complex expressions

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!