Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add overrides for Sonarr quality profile commands #104

Merged
merged 1 commit into from
May 9, 2022
Merged

fix: Add overrides for Sonarr quality profile commands #104

merged 1 commit into from
May 9, 2022

Conversation

wthueb
Copy link
Contributor

@wthueb wthueb commented May 9, 2022

Fixes #103.

Adds overrides just for Sonarr instead of moving everything to the subclasses of BaseArrAPI, since it seems to be the odd one out (I wonder why?). Technically by the naming pyarr has been following, it should conform to Sonarr's wiki and the functions should be get_profile, upd_profile, etc, but that just seems confusing for people using pyarr.

@sourcery-ai
Copy link

sourcery-ai bot commented May 9, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.34 ⭐ 0.34 ⭐ 0.00
Method Length 25.32 ⭐ 25.04 ⭐ -0.28 👍
Working memory 5.61 ⭐ 5.51 ⭐ -0.10 👍
Quality 90.13% 90.47% 0.34% 👍
Other metrics Before After Change
Lines 398 436 38
Changed files Quality Before Quality After Quality Change
pyarr/sonarr.py 90.13% ⭐ 90.47% ⭐ 0.34% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
pyarr/sonarr.py SonarrAPI._series_json 4 ⭐ 80 🙂 12 😞 64.24% 🙂 Extract out complex expressions
pyarr/sonarr.py SonarrAPI.add_series 0 ⭐ 43 ⭐ 11 😞 75.72% ⭐ 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 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 this quality report!

@marksie1988
Copy link
Collaborator

Thanks for doing this, I believe that the new Sonarr v3 API does align this naming, I think that is where this issue has stemmed from as I tested on the v3 API by mistake :)

I will update version and do a release shortly

@marksie1988 marksie1988 merged commit 8188ff4 into totaldebug:master May 9, 2022
@marksie1988 marksie1988 changed the title Add overrides for Sonarr quality profile commands fix: Add overrides for Sonarr quality profile commands May 9, 2022
@marksie1988 marksie1988 added the type/bug Something isn't working label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_quality_profile not working with Sonarr
2 participants