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

Added support to expose camera and doorbell data (Sourcery refactored) #183

Closed
wants to merge 3 commits into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Sep 30, 2020

Pull Request #182 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/bachya/simplisafe-python pull/182/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Sep 30, 2020

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.83 ⭐ 0.90 ⭐ 0.07 👎
Method Length 67.30 🙂 68.99 🙂 1.69 👎
Working memory 6.58 🙂 6.68 🙂 0.10 👎
Quality 81.72% 81.13% -0.59% 👎
Other metrics Before After Change
Lines 1917 2029 112
Changed files Quality Before Quality After Quality Change
simplipy/api.py 83.57% ⭐ 83.59% ⭐ 0.02% 👍
simplipy/system/init.py 89.95% ⭐ 89.32% ⭐ -0.63% 👎
tests/common.py 94.02% ⭐ 93.90% ⭐ -0.12% 👎
tests/system/test_v2.py 69.54% 🙂 69.42% 🙂 -0.12% 👎
tests/system/test_v3.py 70.62% 🙂 70.39% 🙂 -0.23% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
simplipy/api.py API.request 23 😞 262 ⛔ 13 😞 29.56% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
tests/system/test_v3.py test_properties 0 338 ⛔ 17 ⛔ 42.17% 😞 Try splitting into smaller methods. Extract out complex expressions
simplipy/system/init.py create_pin_payload 10 🙂 187 😞 13 😞 44.52% 😞 Try splitting into smaller methods. Extract out complex expressions
simplipy/api.py API.authenticate 1 ⭐ 138 😞 13 😞 58.04% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/system/test_v3.py test_get_systems 0 161 😞 11 😞 59.90% 🙂 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 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.

@codeclimate
Copy link

codeclimate bot commented Sep 30, 2020

Code Climate has analyzed commit 9f14bc5 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@sourcery-ai sourcery-ai bot closed this Sep 30, 2020
@sourcery-ai sourcery-ai bot deleted the sourcery/pull-182 branch September 30, 2020 16:50
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant