ShahriyarR / MySQL-AutoXtraBackup

MySQL-AutoXtraBackup commandline tool written in Python 3 based on Percona XtraBackup
https://autoxtrabackup.azepug.az/
MIT License
139 stars 79 forks source link

first draft commit for starting to implement api (Sourcery refactored) #421

Closed sourcery-ai[bot] closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Pull Request #419 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 bugfix_issu418 branch, then run:

git fetch origin sourcery/bugfix_issu418
git merge --ff-only FETCH_HEAD
git reset HEAD^
sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 15.34 🙂 15.08 🙂 -0.26 👍
Method Length 89.89 🙂 90.00 🙂 0.11 👎
Working memory 38.22 ⛔ 38.04 ⛔ -0.18 👍
Quality 42.87% 😞 43.55% 😞 0.68% 👍
Other metrics Before After Change
Lines 242 242 0
Changed files Quality Before Quality After Quality Change
autoxtrabackup.py 42.87% 😞 43.55% 😞 0.68% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
autoxtrabackup.py all_procedure 25 😞 552 ⛔ 63 ⛔ 12.46% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
autoxtrabackup.py check_file_content 6 ⭐ 74 🙂 18 ⛔ 55.96% 🙂 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!

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