Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forced libsecp256k1 and assorted minor fixes #99

Merged
merged 4 commits into from
Feb 2, 2023
Merged

Conversation

fametrano
Copy link
Member

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 1, 2023

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 5.65 ⭐ 5.65 ⭐ 0.00
Method Length 81.86 🙂 81.86 🙂 0.00
Working memory 8.74 🙂 8.74 🙂 0.00
Quality 65.13% 🙂 65.13% 🙂 0.00%
Other metrics Before After Change
Lines 4811 4768 -43
Changed files Quality Before Quality After Quality Change
setup.py 74.61% 🙂 74.85% 🙂 0.24% 👍
btclib/network.py 72.83% 🙂 72.83% 🙂 0.00%
btclib/bip32/bip32.py 65.51% 🙂 65.51% 🙂 0.00%
btclib/block/block.py 85.24% ⭐ 85.24% ⭐ 0.00%
btclib/block/block_header.py 74.17% 🙂 74.17% 🙂 0.00%
btclib/ecc/dsa.py 67.04% 🙂 67.04% 🙂 0.00%
btclib/ecc/rfc6979_nonce.py 61.34% 🙂 61.34% 🙂 0.00%
btclib/mnemonic/entropy.py 62.80% 🙂 62.80% 🙂 0.00%
btclib/psbt/psbt.py 61.12% 🙂 61.12% 🙂 0.00%
btclib/psbt/psbt_in.py 56.77% 🙂 56.77% 🙂 0.00%
btclib/script/script.py 65.67% 🙂 65.67% 🙂 0.00%
btclib/script/sig_hash.py 48.74% 😞 48.74% 😞 0.00%
btclib/tx/out_point.py 86.12% ⭐ 86.12% ⭐ 0.00%
btclib/tx/tx.py 74.62% 🙂 74.62% 🙂 0.00%
btclib/tx/tx_in.py 87.30% ⭐ 87.30% ⭐ 0.00%
btclib/tx/tx_out.py 88.08% ⭐ 88.08% ⭐ 0.00%
tests/ec/test_curve.py 63.12% 🙂 63.12% 🙂 0.00%
tests/ec/test_sec_point.py 60.30% 🙂 60.30% 🙂 0.00%
tests/script/test_sig_hash_taproot.py 56.66% 🙂 56.66% 🙂 0.00%
tests/script/test_taproot.py 75.60% ⭐ 75.60% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
btclib/psbt/psbt_in.py PsbtIn.parse 16 🙂 279 ⛔ 32 ⛔ 23.33% ⛔ Try splitting into smaller methods. Extract out complex expressions
btclib/script/sig_hash.py taproot 13 🙂 314 ⛔ 18 ⛔ 29.54% 😞 Try splitting into smaller methods. Extract out complex expressions
btclib/bip32/bip32.py BIP32KeyData.assert_valid 21 😞 304 ⛔ 11 😞 32.58% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
btclib/script/script.py parse 28 😞 153 😞 14 😞 33.13% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
btclib/mnemonic/entropy.py collect_rolls 21 😞 207 ⛔ 13 😞 34.09% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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 fametrano merged commit 92e1c3d into master Feb 2, 2023
@fametrano fametrano deleted the force_secp256k1 branch February 2, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants