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

Mypy & Black 21.x compatibility #135

Merged
merged 2 commits into from
May 13, 2021
Merged

Mypy & Black 21.x compatibility #135

merged 2 commits into from
May 13, 2021

Conversation

akaihola
Copy link
Owner

Enable implicit re-export from Black

Black 21.x split the code base into modules. Symbols are not re-exported in the main package, so we need this Mypy directive in order to pass Mypy checks when Darker imports from Black.

We can't yet import directly from the Black submodules since we want to keep supporting Black 20.x at least for some time still.

akaihola added 2 commits May 13, 2021 15:59
Black 21.x split the code base into modules. Symbols are not re-exported in the
main package, so we need this Mypy directive in order to pass Mypy
checks when Darker imports from Black.

We can't yet import directly from the Black submodules since we want to
keep supporting Black 20.x at least for some time still.
@akaihola akaihola added the CI label May 13, 2021
@akaihola akaihola added this to the 1.2.4 milestone May 13, 2021
@akaihola akaihola self-assigned this May 13, 2021
@sourcery-ai
Copy link

sourcery-ai bot commented May 13, 2021

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 2.00 ⭐ 2.00 ⭐ 0.00
Method Length 65.67 🙂 65.67 🙂 0.00
Working memory 7.17 🙂 7.17 🙂 0.00
Quality 77.90% 77.90% 0.00%
Other metrics Before After Change
Lines 122 122 0
Changed files Quality Before Quality After Quality Change
src/darker/black_diff.py 77.90% ⭐ 77.90% ⭐ 0.00%

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

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

Successfully merging this pull request may close these issues.

1 participant