Skip to content

Add an Optional Parameter Filter For JSON Rules (Sourcery refactored)#213

Closed
sourcery-ai[bot] wants to merge 3 commits intomasterfrom
sourcery/pull-212
Closed

Add an Optional Parameter Filter For JSON Rules (Sourcery refactored)#213
sourcery-ai[bot] wants to merge 3 commits intomasterfrom
sourcery/pull-212

Conversation

@sourcery-ai
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot commented Jul 11, 2021

Pull Request #212 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/quark-engine/quark-engine pull/212/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:

Help us improve this pull request!

@sourcery-ai sourcery-ai Bot requested a review from haeter525 July 11, 2021 13:55
@pep8speaks
Copy link
Copy Markdown

pep8speaks commented Jul 11, 2021

Hello @sourcery-ai[bot]! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-07-12 07:41:50 UTC

@sourcery-ai sourcery-ai Bot force-pushed the sourcery/pull-212 branch from 50a3e6f to 9e3e139 Compare July 11, 2021 14:01
@sourcery-ai sourcery-ai Bot force-pushed the sourcery/pull-212 branch from 9e3e139 to 19db0fd Compare July 11, 2021 14:03
@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Jul 11, 2021

This pull request introduces 1 alert when merging 19db0fd into ad0f27c - view on LGTM.com

new alerts:

  • 1 for Unnecessary pass

@sourcery-ai sourcery-ai Bot force-pushed the sourcery/pull-212 branch from 19db0fd to ff21307 Compare July 12, 2021 07:41
@sourcery-ai
Copy link
Copy Markdown
Author

sourcery-ai Bot commented Jul 12, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 9.54 🙂 9.81 🙂 0.27 👎
Method Length 67.53 🙂 62.20 🙂 -5.33 👍
Working memory 9.28 🙂 9.04 🙂 -0.24 👍
Quality 62.70% 🙂 64.26% 🙂 1.56% 👍
Other metrics Before After Change
Lines 876 1043 167
Changed files Quality Before Quality After Quality Change
quark/Objects/quark.py 50.91% 🙂 50.08% 🙂 -0.83% 👎
tests/Object/test_quark.py 85.98% ⭐ 87.87% ⭐ 1.89% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
quark/Objects/quark.py Quark.check_parameter 48 ⛔ 201 😞 13 😞 23.34% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
quark/Objects/quark.py Quark.run 19 😞 326 ⛔ 14 😞 28.65% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
quark/Objects/quark.py Quark.generate_json_report 15 🙂 198 😞 18 ⛔ 33.64% 😞 Try splitting into smaller methods. Extract out complex expressions
quark/Objects/quark.py Quark.show_detail_report 13 🙂 201 😞 11 😞 44.06% 😞 Try splitting into smaller methods. Extract out complex expressions
quark/Objects/quark.py Quark.show_label_report 5 ⭐ 177 😞 11 😞 53.44% 🙂 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!

Help us improve this quality report!

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Jul 12, 2021

This pull request introduces 1 alert when merging ff21307 into ad0f27c - view on LGTM.com

new alerts:

  • 1 for Unnecessary pass

@sourcery-ai sourcery-ai Bot closed this Jul 12, 2021
@krnick krnick deleted the sourcery/pull-212 branch July 14, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants