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

Reformat empty and all-whitespace files properly #197

Merged
merged 4 commits into from
Sep 20, 2021
Merged

Conversation

akaihola
Copy link
Owner

Fixes #166

@akaihola akaihola added the enhancement New feature or request label Sep 18, 2021
@akaihola akaihola added this to the 1.3.1 milestone Sep 18, 2021
@akaihola akaihola self-assigned this Sep 18, 2021
@akaihola
Copy link
Owner Author

@AckslD, would you be willing to review this pull request? Can I invite you as a collaborator on this repository?

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 20, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.88 ⭐ 3.37 ⭐ 0.49 👎
Method Length 90.00 🙂 88.10 🙂 -1.90 👍
Working memory 6.95 🙂 6.86 🙂 -0.09 👍
Quality 74.65% 🙂 74.36% 🙂 -0.29% 👎
Other metrics Before After Change
Lines 327 352 25
Changed files Quality Before Quality After Quality Change
src/darker/black_diff.py 75.51% ⭐ 73.94% 🙂 -1.57% 👎
src/darker/tests/test_black_diff.py 73.37% 🙂 74.96% 🙂 1.59% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
src/darker/tests/test_black_diff.py test_apply_black_excludes 4 ⭐ 185 😞 11 😞 53.73% 🙂 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_black_diff.py test_black_config 2 ⭐ 173 😞 9 🙂 60.72% 🙂 Try splitting into smaller methods

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!

@akaihola akaihola merged commit cb139b2 into master Sep 20, 2021
@akaihola akaihola deleted the all-whitespace branch September 20, 2021 19:23
@AckslD
Copy link

AckslD commented Sep 25, 2021

Hi @akaihola! Sorry for my late reply! I'm afraid I'm not sure how much time I'll be able to contribute to darker. Thanks for the invite though! I'll let you know if I find more time :)

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
Development

Successfully merging this pull request may close these issues.

Behavior on all-whitespace files differs from Black
2 participants