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

doing code refactoring for autoxtrabackup.py #417

Closed ShahriyarR closed 3 years ago

ShahriyarR commented 4 years ago

Fixed #416

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report (beta)

✅  Merging this PR will increase code quality in the affected files by 0.04 out of 10.

Quality metrics Before After Change
Complexity 4.97 3.89 -1.08 🔵
Method Length 79.78 79.85 0.07 🔴
Quality 8.00 8.04 0.04 🔵
Other metrics Before After Change
Lines 782 734 -48
Changed files Quality Before Quality After Quality Change
autoxtrabackup.py 8.13 8.29 0.16 🔵
backup_prepare/prepare.py 6.18 6.18 0.00
general_conf/check_env.py 8.40 8.56 0.16 🔵
general_conf/generalops.py 8.51 8.30 -0.21 🔴

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

File Function Complexity Length Overall Recommendation
autoxtrabackup.py all_procedure 25 551.04 2.73 Split out functionality
backup_prepare/prepare.py Prepare.prepare_with_tags 28 271.72 3.08 Split out functionality
backup_prepare/prepare.py Prepare.prepare_inc_full_backups 16 184.82 4.81 Split out functionality

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.