btclib-org / btclib

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

Fix tox errors #75

Closed giacomocaironi closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.79 ⭐ 0.80 ⭐ 0.01 👎
Method Length 96.93 🙂 98.32 🙂 1.39 👎
Working memory 7.65 🙂 7.66 🙂 0.01 👎
Quality 67.12% 🙂 67.15% 🙂 0.03% 👍
Other metrics Before After Change
Lines 515 521 6
Changed files Quality Before Quality After Quality Change
btclib/hashes.py 87.07% ⭐ 86.19% ⭐ -0.88% 👎
btclib/bip32/der_path.py 80.16% ⭐ 80.11% ⭐ -0.05% 👎
tests/tx/test_tx.py 60.26% 🙂 60.26% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
tests/tx/test_tx.py test_tx 0 ⭐ 697 ⛔ 12 😞 46.17% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/tx/test_tx.py test_dataclasses_json_dict 0 ⭐ 266 ⛔ 9 🙂 56.58% 🙂 Try splitting into smaller methods
tests/tx/test_tx.py test_coinbase_block_1 0 ⭐ 229 ⛔ 8 🙂 60.71% 🙂 Try splitting into smaller methods
tests/tx/test_tx.py test_double_witness 0 ⭐ 186 😞 5 ⭐ 71.16% 🙂 Try splitting into smaller methods
tests/tx/test_tx.py test_wiki_transaction 0 ⭐ 171 😞 5 ⭐ 72.48% 🙂 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!

fametrano commented 1 year ago

superseeded by https://github.com/btclib-org/btclib/pull/78