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: upd_episode throws error when supplying data #109

Merged
merged 2 commits into from
Jun 27, 2022

Conversation

marksie1988
Copy link
Collaborator

Description

  • Fixed some incorrect type hints
  • Added deprecation warning to functions in favour of new get_episode() function, this allows the same functionality in a single function.
    get_episode_by_episode_id
    get_episode_by_series_id
  • Resolved assertion errors caused by adding type hints

Related issues

Motivation and Context

Resolves issues with the latest release

How has this been tested

This has been tested in my lab

Types of changes

  • Docs change / refactoring.
  • Non-breaking change (fix or feature that wouldn't cause existing functionality to change/break).
  • Breaking change (fix or feature that would cause existing functionality to change/break).

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes don't generate new warnings.
  • I have read the CONTRIBUTING document.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests pass.

@marksie1988 marksie1988 added the type/bug Something isn't working label Jun 27, 2022
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 27, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.46 ⭐ 0.53 ⭐ 0.07 👎
Method Length 23.04 ⭐ 24.37 ⭐ 1.33 👎
Working memory 5.41 ⭐ 5.60 ⭐ 0.19 👎
Quality 90.82% 90.07% -0.75% 👎
Other metrics Before After Change
Lines 426 431 5
Changed files Quality Before Quality After Quality Change
pyarr/sonarr.py 90.82% ⭐ 90.07% ⭐ -0.75% 👎

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 ⭐ 40 ⭐ 11 😞 76.21% ⭐ Extract out complex expressions
pyarr/sonarr.py SonarrAPI.get_wanted 0 ⭐ 35 ⭐ 11 😞 77.02% ⭐ 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 marksie1988 changed the title 108 upd episode doesnt work as expected fix: upd_episode throws error when supplying data Jun 27, 2022
@marksie1988 marksie1988 merged commit b4d4155 into master Jun 27, 2022
@marksie1988 marksie1988 deleted the 108-upd_episode_doesnt_work_as_expected branch June 28, 2022 12:27
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.

upd_episode doesnt work as expected.
1 participant