Skip to content

Add files via upload (Sourcery refactored)#7

Open
sourcery-ai[bot] wants to merge 1 commit intocurly60e-patch-4from
sourcery/curly60e-patch-4
Open

Add files via upload (Sourcery refactored)#7
sourcery-ai[bot] wants to merge 1 commit intocurly60e-patch-4from
sourcery/curly60e-patch-4

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Jan 25, 2021

Pull Request #6 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 curly60e-patch-4 branch, then run:

git fetch origin sourcery/curly60e-patch-4
git merge --ff-only FETCH_HEAD
git reset HEAD^

@sourcery-ai sourcery-ai bot requested a review from curly60e January 25, 2021 01:29
Comment on lines -641 to +650
if db is True:
clear()
blogo()
tick()
bitLN['pd'] = "PAID"
pickle.dump(bitLN, open("lnbitSN.conf", "wb"))
createFileConnLNBits()
break
else:
if db is not True:
continue

clear()
blogo()
tick()
bitLN['pd'] = "PAID"
pickle.dump(bitLN, open("lnbitSN.conf", "wb"))
createFileConnLNBits()
break
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function aaccPPiLNBits refactored with the following changes:

Comment on lines -697 to +705
if db is True:
clear()
blogo()
tick()
bitLN['pd'] = "PAID"
pickle.dump(bitLN, open("lnpaySN.conf", "wb"))
createFileConnLNPay()
break
else:
if db is not True:
continue

clear()
blogo()
tick()
bitLN['pd'] = "PAID"
pickle.dump(bitLN, open("lnpaySN.conf", "wb"))
createFileConnLNPay()
break
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function aaccPPiLNPay refactored with the following changes:

Comment on lines -753 to +760
if db is True:
clear()
blogo()
tick()
bitLN['pd'] = "PAID"
pickle.dump(bitLN, open("opennodeSN.conf", "wb"))
createFileConnOpenNode()
break
else:
if db is not True:
continue

clear()
blogo()
tick()
bitLN['pd'] = "PAID"
pickle.dump(bitLN, open("opennodeSN.conf", "wb"))
createFileConnOpenNode()
break
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function aaccPPiOpenNode refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jan 25, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.38 ⭐ 7.22 ⭐ -0.16 👍
Method Length 99.88 🙂 99.88 🙂 0.00
Working memory 13.33 😞 13.33 😞 0.00
Quality 53.71% 🙂 53.86% 🙂 0.15% 👍
Other metrics Before After Change
Lines 1189 1186 -3
Changed files Quality Before Quality After Quality Change
PyBlock.py 53.71% 🙂 53.86% 🙂 0.15% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
PyBlock.py mainmenuREMOTEcontrol 10 🙂 191 😞 24 ⛔ 35.24% 😞 Try splitting into smaller methods. Extract out complex expressions
PyBlock.py APIMenuLOCAL 10 🙂 199 😞 19 ⛔ 37.16% 😞 Try splitting into smaller methods. Extract out complex expressions
PyBlock.py menuD 21 😞 148 😞 14 😞 37.92% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
PyBlock.py platfformsLOCALcontrol 13 🙂 127 😞 28 ⛔ 37.94% 😞 Try splitting into smaller methods. Extract out complex expressions
PyBlock.py lightningnetworkREMOTEcontrol 10 🙂 148 😞 22 ⛔ 40.07% 😞 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

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.

0 participants

Comments