flynt icon indicating copy to clipboard operation
flynt copied to clipboard

isort --profile black

Open cclauss opened this issue 3 years ago • 3 comments

https://github.com/PyCQA/isort

cclauss avatar Jun 26 '22 22:06 cclauss

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 8.80 🙂 8.80 🙂 0.00
Method Length 53.19 ⭐ 53.14 ⭐ -0.05 👍
Working memory 8.02 🙂 8.02 🙂 0.00
Quality 65.66% 🙂 65.66% 🙂 0.00%
Other metrics Before After Change
Lines 1828 1826 -2
Changed files Quality Before Quality After Quality Change
src/flynt/api.py 45.31% 😞 45.31% 😞 0.00%
src/flynt/cli.py 49.47% 😞 49.47% 😞 0.00%
src/flynt/process.py 66.56% 🙂 66.56% 🙂 0.00%
src/flynt/pyproject_finder.py 78.38% ⭐ 78.38% ⭐ 0.00%
src/flynt/string_concat/transformer.py 76.35% ⭐ 76.35% ⭐ 0.00%
src/flynt/transform/FstringifyTransformer.py 71.34% 🙂 71.34% 🙂 0.00%
src/flynt/transform/format_call_transforms.py 38.78% 😞 38.78% 😞 0.00%
src/flynt/transform/percent_transformer.py 60.17% 🙂 60.17% 🙂 0.00%
src/flynt/transform/transform.py 39.87% 😞 39.87% 😞 0.00%
test/conftest.py 87.32% ⭐ 87.32% ⭐ 0.00%
test/test_pyproject.py 88.72% ⭐ 88.72% ⭐ 0.00%
test/integration/test_api.py 90.46% ⭐ 90.47% ⭐ 0.01% 👍
test/integration/test_concat.py 90.41% ⭐ 90.41% ⭐ 0.00%
test/integration/expected_out/CantAffordActiveException.py 95.02% ⭐ 95.02% ⭐ 0.00%
test/integration/expected_out/dict_func.py 90.65% ⭐ 90.65% ⭐ 0.00%
test/integration/expected_out/escaped_newline.py 99.33% ⭐ 99.33% ⭐ 0.00%
test/integration/expected_out/long.py 74.89% 🙂 74.99% 🙂 0.10% 👍
test/integration/expected_out_single_line/CantAffordActiveException.py 95.02% ⭐ 95.02% ⭐ 0.00%
test/integration/expected_out_single_line/dict_func.py 90.65% ⭐ 90.65% ⭐ 0.00%
test/integration/expected_out_single_line/escaped_newline.py 99.33% ⭐ 99.33% ⭐ 0.00%
test/integration/expected_out_single_line/long.py 74.89% 🙂 74.99% 🙂 0.10% 👍
test/integration/samples_in/CantAffordActiveException.py 96.89% ⭐ 96.89% ⭐ 0.00%
test/integration/samples_in/dict_func.py 93.55% ⭐ 93.55% ⭐ 0.00%
test/integration/samples_in/escaped_newline.py 99.50% ⭐ 99.50% ⭐ 0.00%
test/integration/samples_in/long.py 74.99% 🙂 75.10% ⭐ 0.11% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
src/flynt/transform/format_call_transforms.py joined_string 37 ⛔ 355 ⛔ 13 😞 19.78% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/flynt/api.py _fstringify_file 26 😞 300 ⛔ 14 😞 24.84% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/flynt/process.py JoinTransformer.maybe_replace 21 😞 193 😞 14 😞 33.73% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/flynt/transform/percent_transformer.py transform_dict 15 🙂 194 😞 13 😞 39.61% 😞 Try splitting into smaller methods. Extract out complex expressions
src/flynt/transform/transform.py transform_chunk 18 🙂 164 😞 13 😞 39.87% 😞 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!

sourcery-ai[bot] avatar Jun 26 '22 22:06 sourcery-ai[bot]

Let's exclude integration/samples_in/, integration/expected_out/, integration/expected_out_single_line/

ikamensh avatar Jun 27 '22 14:06 ikamensh

@cclauss could you exclude the folders:

integration/samples_in/, integration/expected_out/, integration/expected_out_single_line/

ikamensh avatar Jul 07 '22 19:07 ikamensh

feel free to reopen

ikamensh avatar Sep 15 '22 14:09 ikamensh