jkirkcaldy / plex-utills

Manage your Plex library automatically
MIT License
326 stars 26 forks source link

Sourcery refactored master branch #92

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

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 master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 160.41 ⛔ 159.34 ⛔ -1.07 👍
Method Length 167.73 😞 166.81 😞 -0.92 👍
Working memory 16.70 ⛔ 16.71 ⛔ 0.01 👎
Quality 30.61% 😞 31.10% 😞 0.49% 👍
Other metrics Before After Change
Lines 5431 5328 -103
                | Changed files | Quality Before | Quality After | Quality Change |
                | --- | :---: | :---: | :---: |
                | dv_test.py | 25.80% 😞 | 27.44% 😞 | 1.64% 👍|

| app/routes.py | 56.72% 🙂 | 56.52% 🙂 | -0.20% 👎| | app/scripts.py | 27.40% 😞 | 27.56% 😞 | 0.16% 👍| | app/scripts/4k_hdr_poster.py | 58.96% 🙂 | 59.36% 🙂 | 0.40% 👍| | app/scripts/check_files.py | 31.64% 😞 | 35.25% 😞 | 3.61% 👍| | app/scripts/config_check.py | 6.41% ⛔ | 14.58% ⛔ | 8.17% 👍| | app/scripts/posters3d.py | 38.86% 😞 | 39.79% 😞 | 0.93% 👍| | app/scripts/posters4k.py | 29.15% 😞 | 29.28% 😞 | 0.13% 👍|

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

            | File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
            | --- | --- | :---: | :---: | :---: | :---: | --- |
            | app/scripts.py | posters4k | 606 ⛔ | 3266 ⛔ | 30 ⛔ | 0.88% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |

| app/scripts.py | recently_added_posters | 548 ⛔ | 2831 ⛔ | 30 ⛔ | 0.88% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions | | app/scripts.py | restore_posters | 107 ⛔ | 670 ⛔ | 21 ⛔ | 3.74% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions | | app/scripts.py | restore_posters.continue_restore | 80 ⛔ | 506 ⛔ | 21 ⛔ | 4.55% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions | | app/scripts/posters4k.py | posters4k | 64 ⛔ | 825 ⛔ | 21 ⛔ | 4.97% ⛔ | 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:

             - ⭐ 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](https://docs.sourcery.ai/GitHub/Quality-Report/) for details on how these metrics are calculated.

            We are actively working on this report - lots more documentation and extra metrics to come!

            Help us [improve](https://research.typeform.com/to/j06Spdfr?type=quality_report&github_login=sourcery-ai%5Bbot%5D&base_repo=https%3A%2F%2Fgithub.com%2Fjkirkcaldy%2Fplex-utills.git&base_remote_ref=refs%2Fpull%2F92%2Fhead&base_ref=sourcery%2Fmaster&base_sha=6dcfaf302595bb8f42e9229480903ceaf2d50a15&head_repo=https%3A%2F%2Fgithub.com%2Fjkirkcaldy%2Fplex-utills.git&head_ref=sourcery%2Fsourcery%2Fmaster&base_pr_number=92&base_pr_state=open) this quality report!