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 compatibility with Black >= 22.1 #270

Merged
merged 5 commits into from
Feb 6, 2022
Merged

Add compatibility with Black >= 22.1 #270

merged 5 commits into from
Feb 6, 2022

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Feb 2, 2022

  • Black compatibility module
  • tests
  • change log

Fixes #264.

@akaihola akaihola added the bug Something isn't working label Feb 2, 2022
@akaihola akaihola added this to the 1.4.0 milestone Feb 2, 2022
@akaihola akaihola self-assigned this Feb 2, 2022
@akaihola akaihola marked this pull request as draft February 2, 2022 21:35
@akaihola akaihola force-pushed the black-22 branch 5 times, most recently from 1224a0d to 0f84262 Compare February 6, 2022 17:06
@sourcery-ai
Copy link

sourcery-ai bot commented Feb 6, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.20 ⭐ 1.21 ⭐ 0.01 👎
Method Length 59.98 ⭐ 58.75 ⭐ -1.23 👍
Working memory 7.83 🙂 7.86 🙂 0.03 👎
Quality 77.13% 77.15% 0.02% 👍
Other metrics Before After Change
Lines 1266 1309 43
Changed files Quality Before Quality After Quality Change
src/darker/config.py 91.55% ⭐ 91.55% ⭐ 0.00%
src/darker/import_sorting.py 84.58% ⭐ 84.58% ⭐ 0.00%
src/darker/tests/conftest.py 86.43% ⭐ 86.43% ⭐ 0.00%
src/darker/tests/test_black_diff.py 72.25% 🙂 72.62% 🙂 0.37% 👍
src/darker/tests/test_import_sorting.py 85.54% ⭐ 85.74% ⭐ 0.20% 👍
src/darker/tests/test_main.py 67.97% 🙂 67.95% 🙂 -0.02% 👎

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_main.py test_main 6 ⭐ 433.96 ⛔ 25 ⛔ 30.26% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_black_diff.py test_filter_python_files 4 ⭐ 240.99 ⛔ 11 😞 49.88% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_main.py test_format_edited_parts 0 ⭐ 195.99 😞 15 😞 50.84% 🙂 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_main.py test_reformat_single_file 0 ⭐ 113 🙂 18 ⛔ 56.42% 🙂 Extract out complex expressions
src/darker/tests/test_main.py test_format_edited_parts_historical 0 ⭐ 162 😞 11 😞 59.80% 🙂 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!

@akaihola akaihola requested a review from magnunm February 6, 2022 17:17
@akaihola akaihola marked this pull request as ready for review February 6, 2022 17:18
@akaihola
Copy link
Owner Author

akaihola commented Feb 6, 2022

@jedie feel free to accept my invitation as a collaborator and review this PR!

@akaihola akaihola merged commit 715e5a2 into master Feb 6, 2022
@akaihola akaihola deleted the black-22 branch February 6, 2022 17:43
@roniemartinez
Copy link
Collaborator

@akaihola when do you plan to release the fix? This fix is not available in PyPI yet.

@akaihola
Copy link
Owner Author

akaihola commented Feb 8, 2022

@roniemartinez I'm allocating enough time for making the release today finally. I'll also drop a couple of other pull requests which are waiting for review, they'll wait for the next release so I can get this out faster.

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
Development

Successfully merging this pull request may close these issues.

incompatible with black v22.1.0 ?
3 participants