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

Prepare backup api changes #422

Closed ShahriyarR closed 3 years ago

ShahriyarR commented 3 years ago
sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 16.82 🙂 16.82 🙂 0.00
Method Length 134.83 😞 135.00 😞 0.17 👎
Working memory 13.95 😞 13.95 😞 0.00
Quality 41.66% 😞 41.64% 😞 -0.02% 👎
Other metrics Before After Change
Lines 215 215 0
Changed files Quality Before Quality After Quality Change
backup_prepare/prepare.py 41.66% 😞 41.64% 😞 -0.02% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
backup_prepare/prepare.py Prepare.prepare_with_tags 28 😞 265 ⛔ 20 ⛔ 19.42% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
backup_prepare/prepare.py Prepare.prepare_inc_full_backups 16 🙂 179 😞 15 😞 37.37% 😞 Try splitting into smaller methods. Extract out complex expressions
backup_prepare/prepare.py Prepare.prepare_backup_and_copy_back 16 🙂 133 😞 9 🙂 52.00% 🙂 Try splitting into smaller methods
backup_prepare/prepare.py Prepare.prepare_only_full_backup 6 ⭐ 130 😞 11 😞 57.33% 🙂 Try splitting into smaller methods. Extract out complex expressions
backup_prepare/prepare.py Prepare.__init__ 3 ⭐ 76 🙂 10 😞 69.46% 🙂 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.