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

fixed error message and cleaned up code #103

Merged
merged 3 commits into from Feb 5, 2023
Merged

fixed error message and cleaned up code #103

merged 3 commits into from Feb 5, 2023

Conversation

fametrano
Copy link
Member

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 3, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.00 ⭐ 4.28 ⭐ 0.28 👎
Method Length 84.88 🙂 85.91 🙂 1.03 👎
Working memory 7.40 🙂 7.46 🙂 0.06 👎
Quality 67.55% 🙂 66.94% 🙂 -0.61% 👎
Other metrics Before After Change
Lines 1445 1445 0
Changed files Quality Before Quality After Quality Change
btclib/bip32/bip32.py 65.51% 🙂 63.21% 🙂 -2.30% 👎
btclib/ec/curve_group.py 69.45% 🙂 69.45% 🙂 0.00%
tests/bip32/test_bip32.py 66.55% 🙂 66.55% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
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/ec/curve_group.py CurveGroup.__init__ 13 🙂 224 ⛔ 11 😞 42.48% 😞 Try splitting into smaller methods. Extract out complex expressions
btclib/ec/curve_group.py _multi_mult 11 🙂 202 😞 12 😞 44.01% 😞 Try splitting into smaller methods. Extract out complex expressions
btclib/bip32/bip32.py _derive 16 🙂 164 😞 8 🙂 50.90% 🙂 Try splitting into smaller methods
btclib/ec/curve_group.py CurveGroup.add_jac 2 ⭐ 201 😞 11 😞 54.44% 🙂 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 changed the title speeded up BIP32 public derivation by caching fixed error message and cleaned up code Feb 5, 2023
@fametrano fametrano merged commit fd643cf into master Feb 5, 2023
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

1 participant