drf-api-tracking icon indicating copy to clipboard operation
drf-api-tracking copied to clipboard

Delete log records before some days (Sourcery refactored)

Open sourcery-ai[bot] opened this issue 2 years ago • 1 comments

Pull Request #81 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/lingster/drf-api-tracking pull/81/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[bot] avatar Apr 03 '22 12:04 sourcery-ai[bot]

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.24 ⭐ 7.01 ⭐ -0.23 👍
Method Length 40.18 ⭐ 42.41 ⭐ 2.23 👎
Working memory 6.53 🙂 6.77 🙂 0.24 👎
Quality 73.36% 🙂 73.08% 🙂 -0.28% 👎
Other metrics Before After Change
Lines 215 225 10
Changed files Quality Before Quality After Quality Change
rest_framework_tracking/base_mixins.py 72.27% 🙂 72.26% 🙂 -0.01% 👎
rest_framework_tracking/mixins.py 98.34% ⭐ 82.40% ⭐ -15.94% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
rest_framework_tracking/base_mixins.py BaseLoggingMixin.finalize_response 15 🙂 185 😞 9 🙂 47.60% 😞 Try splitting into smaller methods
rest_framework_tracking/base_mixins.py BaseLoggingMixin.initial 2 ⭐ 68 🙂 10 😞 71.67% 🙂 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!

sourcery-ai[bot] avatar Apr 03 '22 12:04 sourcery-ai[bot]