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

--no-skip-string-normalization option #50

Merged
merged 1 commit into from
Aug 9, 2020

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Aug 9, 2020

This option can be used to override

[tool.black]
skip-string-normalization = true

from pyproject.toml (or another configuration file used via the --config option).

@akaihola akaihola added the enhancement New feature or request label Aug 9, 2020
@akaihola akaihola added this to the 1.1.0 milestone Aug 9, 2020
@akaihola akaihola requested a review from CorreyL August 9, 2020 16:44
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 9, 2020

Sourcery Code Quality Report (beta)

❌  Merging this PR will decrease code quality in the affected files by 0.10 out of 10.

Quality metrics Before After Change
Complexity 2.00 1.91 -0.09 🔵
Method Length 59.86 65.15 5.29 🔴
Quality 8.53 8.43 -0.10 🔴
Other metrics Before After Change
Lines 437 496 59
Changed files Quality Before Quality After Quality Change
src/darker/main.py 7.58 7.58 0.00
src/darker/command_line.py 7.97 7.89 -0.08 🔴
src/darker/tests/conftest.py 9.36 9.33 -0.03 🔴
src/darker/tests/test_command_line.py 8.74 8.51 -0.23 🔴

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

File Function Complexity Length Overall Recommendation
src/darker/main.py format_edited_parts 21 210.89 4.10 Split out functionality
src/darker/main.py main 16 182.82 4.84 Split out functionality
src/darker/command_line.py parse_command_line 2 190.42 6.10 Split out functionality
src/darker/tests/test_command_line.py test_black_options 0 193.48 6.26 Split out functionality
src/darker/tests/test_command_line.py test_black_options_skip_string_normalization 0 155.71 6.74 Split out functionality

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.

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! Makes sense if a config file needs to be overridden.

@akaihola akaihola merged commit 5df4aa6 into master Aug 9, 2020
@akaihola akaihola deleted the no-skip-string-normalization branch August 9, 2020 19:39
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