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

Add GitRepoFixture helper methods needed by #80 #87

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Nov 1, 2020

These two additional methods in darker.tests.conftest.GitRepoFixture will be needed in unit tests in #80.

@akaihola akaihola added the enhancement New feature or request label Nov 1, 2020
@akaihola akaihola added this to the 1.2.1 milestone Nov 1, 2020
@akaihola akaihola self-assigned this Nov 1, 2020
@akaihola akaihola mentioned this pull request Nov 1, 2020
@akaihola akaihola marked this pull request as draft November 1, 2020 18:10
@akaihola akaihola force-pushed the GitRepoFixture-for-pr-80 branch from d4f671e to a8df754 Compare November 1, 2020 18:44
- get commit hash at HEAD
- create a branch
- refactor shell command invocation helpers
@akaihola akaihola force-pushed the GitRepoFixture-for-pr-80 branch from a8df754 to b623270 Compare November 3, 2020 16:35
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 3, 2020

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.71 ⭐ 0.45 ⭐ -0.26 👍
Method Length 26.14 ⭐ 22.18 ⭐ -3.96 👍
Working memory 5.29 ⭐ 5.45 ⭐ 0.16 👎
Quality 90.35% 90.80% 0.45% 👍
Other metrics Before After Change
Lines 55 74 19
Changed files Quality Before Quality After Quality Change
src/darker/tests/conftest.py 90.35% ⭐ 90.80% ⭐ 0.45% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
src/darker/tests/conftest.py GitRepoFixture.add 5 ⭐ 68 🙂 10 😞 68.70% 🙂 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 marked this pull request as ready for review November 5, 2020 13:17
@akaihola akaihola requested a review from CorreyL November 7, 2020 14:11
Copy link
Collaborator

@CorreyL CorreyL left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@akaihola akaihola merged commit 69fd4a5 into master Nov 13, 2020
@akaihola akaihola deleted the GitRepoFixture-for-pr-80 branch November 13, 2020 06:31
@akaihola akaihola mentioned this pull request Nov 30, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants