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

Sourcery refactored master branch #8

Merged
merged 10 commits into from Mar 14, 2022
Merged

Sourcery refactored master branch #8

merged 10 commits into from Mar 14, 2022

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Mar 14, 2022

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

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

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from adbar March 14, 2022 17:47
courlan/clean.py Outdated Show resolved Hide resolved
courlan/clean.py Show resolved Hide resolved
courlan/cli.py Show resolved Hide resolved
courlan/core.py Outdated Show resolved Hide resolved
courlan/core.py Outdated Show resolved Hide resolved
courlan/urlutils.py Outdated Show resolved Hide resolved
courlan/urlutils.py Outdated Show resolved Hide resolved
helpers/common-crawl-normalize.py Outdated Show resolved Hide resolved
helpers/find-wordpress-urls.py Outdated Show resolved Hide resolved
tests/urlstore_tests.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #8 (0e40f40) into master (f91cb16) will decrease coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master       #8      +/-   ##
===========================================
- Coverage   100.00%   99.65%   -0.35%     
===========================================
  Files           10       10              
  Lines          591      578      -13     
===========================================
- Hits           591      576      -15     
- Misses           0        2       +2     
Impacted Files Coverage Δ
courlan/clean.py 100.00% <100.00%> (ø)
courlan/cli.py 100.00% <100.00%> (ø)
courlan/core.py 100.00% <100.00%> (ø)
courlan/filters.py 100.00% <100.00%> (ø)
courlan/urlstore.py 98.85% <100.00%> (-1.15%) ⬇️
courlan/urlutils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f91cb16...0e40f40. Read the comment docs.

@sourcery-ai
Copy link
Contributor Author

sourcery-ai bot commented Mar 14, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 9.74 🙂 9.64 🙂 -0.10 👍
Method Length 78.11 🙂 78.07 🙂 -0.04 👍
Working memory 9.43 🙂 9.43 🙂 0.00
Quality 58.61% 🙂 58.70% 🙂 0.09% 👍
Other metrics Before After Change
Lines 1010 1023 13
Changed files Quality Before Quality After Quality Change
courlan/clean.py 52.71% 🙂 52.49% 🙂 -0.22% 👎
courlan/cli.py 66.33% 🙂 67.44% 🙂 1.11% 👍
courlan/filters.py 70.69% 🙂 70.70% 🙂 0.01% 👍
courlan/urlstore.py 66.89% 🙂 67.37% 🙂 0.48% 👍
courlan/urlutils.py 77.51% ⭐ 77.61% ⭐ 0.10% 👍
helpers/find-wordpress-urls.py 47.41% 😞 47.39% 😞 -0.02% 👎
tests/urlstore_tests.py 37.04% 😞 37.04% 😞 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
tests/urlstore_tests.py test_urlstore 13 🙂 977 ⛔ 13 😞 32.16% 😞 Try splitting into smaller methods. Extract out complex expressions
helpers/find-wordpress-urls.py find_target 30 😞 217 ⛔ 9 🙂 35.39% 😞 Refactor to reduce nesting. Try splitting into smaller methods
courlan/urlstore.py UrlStore.establish_download_schedule 18 🙂 184 😞 12 😞 39.62% 😞 Try splitting into smaller methods. Extract out complex expressions
courlan/clean.py clean_query 18 🙂 118 🙂 17 ⛔ 40.22% 😞 Extract out complex expressions
courlan/clean.py scrub_url 18 🙂 213 ⛔ 10 😞 41.04% 😞 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!

@adbar adbar merged commit cd6c2f5 into master Mar 14, 2022
@adbar adbar deleted the sourcery/master branch March 14, 2022 18:35
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.

None yet

2 participants