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 support for black >= 22.1.0 #269

Closed
wants to merge 1 commit into from

Conversation

Mystic-Mirage
Copy link
Collaborator

Black changed find_project_root behavior. Now it returns a tuple.
Let's use find_pyproject_toml instead.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 1, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.49 ⭐ 1.49 ⭐ 0.00
Method Length 27.78 ⭐ 27.78 ⭐ 0.00
Working memory 4.60 ⭐ 4.76 ⭐ 0.16 👎
Quality 89.49% 89.11% -0.38% 👎
Other metrics Before After Change
Lines 178 178 0
Changed files Quality Before Quality After Quality Change
src/darker/config.py 91.55% ⭐ 91.59% ⭐ 0.04% 👍
src/darker/import_sorting.py 84.42% ⭐ 83.00% ⭐ -1.42% 👎

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

File Function Complexity Length Working Memory Quality Recommendation

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!

@Mystic-Mirage
Copy link
Collaborator Author

Duplicates #267

@akaihola
Copy link
Owner

akaihola commented Feb 2, 2022

I took yet another approach to this in #270 by accepting both the old and the new behavior, and encapsulating that in a "Black compatibility" module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants