JuneStepp / OneLauncher

Launcher and Addons Manager for LOTRO and DDO
Other
45 stars 11 forks source link

Sourcery Starbot ⭐ refactored JuneStepp/OneLauncher #11

Closed SourceryAI closed 4 years ago

SourceryAI commented 4 years ago

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch https://github.com/sourcery-ai-bot/OneLauncher master
git merge --ff-only FETCH_HEAD
git reset HEAD^
sourcery-ai[bot] commented 4 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.78 ⭐ 5.54 ⭐ -0.24 👍
Method Length 81.68 🙂 81.40 🙂 -0.28 👍
Working memory 8.19 🙂 8.16 🙂 -0.03 👍
Quality 75.34% 75.60% 0.26% 👍
Other metrics Before After Change
Lines 4916 4852 -64
Changed files Quality Before Quality After Quality Change
OneLauncher/AddonManager.py 71.26% 🙂 71.53% 🙂 0.27% 👍
OneLauncher/MainWindow.py 76.42% ⭐ 76.45% ⭐ 0.03% 👍
OneLauncher/OneLauncherUtils.py 69.38% 🙂 69.57% 🙂 0.19% 👍
OneLauncher/PatchWindow.py 81.45% ⭐ 82.22% ⭐ 0.77% 👍
OneLauncher/ProgressMonitor.py 77.37% ⭐ 77.65% ⭐ 0.28% 👍
OneLauncher/Settings.py 62.08% 🙂 62.18% 🙂 0.10% 👍
OneLauncher/SettingsWindow.py 87.11% ⭐ 87.63% ⭐ 0.52% 👍
OneLauncher/SetupWizard.py 85.24% ⭐ 85.65% ⭐ 0.41% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
OneLauncher/OneLauncherUtils.py WorldQueueConfig.__init__ 56 ⛔ 503 ⛔ 31 ⛔ 3.46% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
OneLauncher/Settings.py Settings.LoadSettings 61 ⛔ 453 ⛔ 29 ⛔ 3.48% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
OneLauncher/AddonManager.py AddonManager.installAddon 57 ⛔ 450 ⛔ 26 ⛔ 4.56% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
OneLauncher/AddonManager.py AddonManager.generateCompendiumFile 37 ⛔ 441 ⛔ 21 ⛔ 10.96% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
OneLauncher/AddonManager.py AddonManager.uninstallPlugins 52 ⛔ 240 ⛔ 22 ⛔ 11.94% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. 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.