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

Common ancestor fix #80

Merged
merged 3 commits into from
Dec 19, 2020
Merged

Common ancestor fix #80

merged 3 commits into from
Dec 19, 2020

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Sep 24, 2020

Bugfix: <commit>... now compares always correctly to the latest common ancestor

This merge request used to be even larger, but I've managed to trim it down. I hope someone is willing to review it in one go.

Note: #107 will fix the build failure.

@akaihola akaihola self-assigned this Sep 24, 2020
@akaihola akaihola added the bug Something isn't working label Sep 24, 2020
@akaihola akaihola added this to the 1.2.1 milestone Sep 24, 2020
@akaihola akaihola linked an issue Sep 24, 2020 that may be closed by this pull request
@akaihola akaihola force-pushed the common-ancestor-fix branch 4 times, most recently from 94239a3 to b869647 Compare October 10, 2020 18:01
@akaihola akaihola force-pushed the common-ancestor-fix branch from b869647 to 451b153 Compare October 17, 2020 18:05
@akaihola
Copy link
Owner Author

100% test coverage for modified lines

@akaihola akaihola force-pushed the common-ancestor-fix branch 3 times, most recently from ed9c5c6 to 8298b59 Compare October 21, 2020 18:18
@akaihola akaihola force-pushed the common-ancestor-fix branch 3 times, most recently from 919b51c to 93c027b Compare November 1, 2020 17:55
@akaihola akaihola mentioned this pull request Nov 1, 2020
@akaihola akaihola marked this pull request as draft November 1, 2020 18:03
@akaihola akaihola force-pushed the common-ancestor-fix branch 2 times, most recently from 95d5b3f to 0cf98e8 Compare November 3, 2020 16:37
akaihola added a commit that referenced this pull request Nov 13, 2020
Add GitRepoFixture helper methods needed by #80
@akaihola akaihola marked this pull request as ready for review November 13, 2020 06:32
@akaihola akaihola force-pushed the common-ancestor-fix branch from 0cf98e8 to 2f41cc1 Compare November 13, 2020 06:35
@akaihola akaihola removed this from the 1.2.1 milestone Nov 27, 2020
@akaihola akaihola added this to the 1.2.2 milestone Nov 27, 2020
@akaihola akaihola force-pushed the common-ancestor-fix branch 2 times, most recently from a3290fe to cf0994e Compare December 18, 2020 20:38
@akaihola akaihola force-pushed the common-ancestor-fix branch from cf0994e to a64b1cc Compare December 19, 2020 19:54
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 19, 2020

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.17 ⭐ 5.22 ⭐ 0.05 👎
Method Length 76.27 🙂 79.55 🙂 3.28 👎
Working memory 14.52 😞 14.65 😞 0.13 👎
Quality 60.15% 🙂 59.26% 🙂 -0.89% 👎
Other metrics Before After Change
Lines 1194 1377 183
Changed files Quality Before Quality After Quality Change
src/darker/main.py 41.28% 😞 41.08% 😞 -0.20% 👎
src/darker/git.py 78.72% ⭐ 72.98% 🙂 -5.74% 👎
src/darker/linting.py 66.04% 🙂 64.63% 🙂 -1.41% 👎
src/darker/tests/test_command_line.py 59.12% 🙂 58.94% 🙂 -0.18% 👎
src/darker/tests/test_git.py 65.64% 🙂 63.99% 🙂 -1.65% 👎
src/darker/tests/test_linting.py 54.12% 🙂 53.97% 🙂 -0.15% 👎
src/darker/tests/test_main.py 69.09% 🙂 68.52% 🙂 -0.57% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/darker/main.py format_edited_parts 22 😞 210 ⛔ 18 ⛔ 27.55% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_command_line.py test_parse_command_line 4 ⭐ 469 ⛔ 60 ⛔ 30.03% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/main.py main 16 🙂 216 ⛔ 12 😞 38.76% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_command_line.py test_black_options 0 ⭐ 194 😞 20 ⛔ 46.59% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_main.py test_main 0 ⭐ 176 😞 23 ⛔ 46.60% 😞 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.

@akaihola akaihola merged commit 6469267 into master Dec 19, 2020
@akaihola akaihola deleted the common-ancestor-fix branch December 19, 2020 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--revision <branch>... compares to HEAD, not working tree
1 participant