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 main branch #42

Merged
merged 1 commit into from
Sep 11, 2021
Merged

Sourcery refactored main branch #42

merged 1 commit into from
Sep 11, 2021

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Sep 11, 2021

Branch main 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 main branch, then run:

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

Help us improve this pull request!

body = "".join(line for line in file.readlines())
body = "".join(file.readlines())
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestGenerator.test_generate_models refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Sep 11, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.07 ⭐ 0.07 ⭐ 0.00
Method Length 66.32 🙂 66.18 🙂 -0.14 👍
Working memory 7.41 🙂 7.41 🙂 0.00
Quality 77.48% 77.51% 0.03% 👍
Other metrics Before After Change
Lines 503 503 0
Changed files Quality Before Quality After Quality Change
tests/test_generator.py 77.48% ⭐ 77.51% ⭐ 0.03% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
tests/test_generator.py TestGenerator.test_generate_urls 0 ⭐ 164 😞 12 😞 57.87% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_generator.py TestGenerator.test_generate_views 0 ⭐ 147 😞 11 😞 61.34% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_generator.py TestGenerator.test_register_models_to_admin 0 ⭐ 127 😞 11 😞 63.63% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_generator.py TestGenerator.test_generate_serializer 0 ⭐ 127 😞 11 😞 63.63% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_generator.py TestGenerator.test_generate_models 0 ⭐ 120 😞 10 😞 66.38% 🙂 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!

@codecov
Copy link

codecov bot commented Sep 11, 2021

Codecov Report

Merging #42 (f78e2cb) into main (02671cd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #42   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          290       290           
=========================================
  Hits           290       290           

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 02671cd...f78e2cb. Read the comment docs.

@Abdenasser Abdenasser merged commit 76312e2 into main Sep 11, 2021
@yezz123 yezz123 deleted the sourcery/main branch September 12, 2021 15:43
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

1 participant