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

https://github.com/jackdewinter/pymarkdown/issues/145 : First pass #149

Merged
merged 6 commits into from
Nov 21, 2021

Conversation

jackdewinter
Copy link
Owner

No description provided.

@codecov
Copy link

codecov bot commented Nov 20, 2021

Codecov Report

Merging #149 (a69eebf) into main (d75952a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #149   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           91        91           
  Lines        10164     10160    -4     
  Branches      1478      1480    +2     
=========================================
- Hits         10164     10160    -4     
Impacted Files Coverage Δ
pymarkdown/plugins/rule_md_027.py 100.00% <ø> (ø)
pymarkdown/transform_to_gfm.py 100.00% <ø> (ø)
pymarkdown/block_quote_processor.py 100.00% <100.00%> (ø)
pymarkdown/container_block_processor.py 100.00% <100.00%> (ø)
pymarkdown/leaf_block_processor.py 100.00% <100.00%> (ø)
pymarkdown/link_reference_definition_helper.py 100.00% <100.00%> (ø)
pymarkdown/list_block_processor.py 100.00% <100.00%> (ø)
pymarkdown/requeue_line_info.py 100.00% <100.00%> (ø)
pymarkdown/tokenized_markdown.py 100.00% <100.00%> (ø)
main.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d75952a...a69eebf. Read the comment docs.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 21, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 12.81 🙂 5.48 ⭐ -7.33 👍
Method Length 87.02 🙂 79.19 🙂 -7.83 👍
Working memory 13.20 😞 11.38 😞 -1.82 👍
Quality 52.72% 🙂 61.22% 🙂 8.50% 👍
Other metrics Before After Change
Lines 14223 14969 746
Changed files Quality Before Quality After Quality Change
pymarkdown/block_quote_processor.py 56.72% 🙂 57.04% 🙂 0.32% 👍
pymarkdown/container_block_processor.py 57.94% 🙂 58.05% 🙂 0.11% 👍
pymarkdown/leaf_block_processor.py 56.28% 🙂 56.25% 🙂 -0.03% 👎
pymarkdown/link_reference_definition_helper.py 52.64% 🙂 52.74% 🙂 0.10% 👍
pymarkdown/list_block_processor.py 55.28% 🙂 56.79% 🙂 1.51% 👍
pymarkdown/main.py 70.26% 🙂 70.26% 🙂 0.00%
pymarkdown/requeue_line_info.py 98.43% ⭐ 98.09% ⭐ -0.34% 👎
pymarkdown/tokenized_markdown.py 62.06% 🙂 64.36% 🙂 2.30% 👍
pymarkdown/transform_to_gfm.py 76.32% ⭐ 76.32% ⭐ 0.00%
pymarkdown/plugins/rule_md_027.py 68.92% 🙂 68.92% 🙂 0.00%
test/pytest_execute.py 63.95% 🙂 64.88% 🙂 0.93% 👍
test/test_perf.py 84.55% ⭐ 84.71% ⭐ 0.16% 👍
test/test_transform_markdown.py 91.39% ⭐ 91.39% ⭐ 0.00%
test/transform_to_markdown.py 49.15% 😞 62.56% 🙂 13.41% 👍
test/verify_line_and_column_numbers.py 28.10% 😞 57.24% 🙂 29.14% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
pymarkdown/container_block_processor.py ContainerBlockProcessor.parse_line_for_container_blocks 5 ⭐ 178 😞 26 ⛔ 40.48% 😞 Try splitting into smaller methods. Extract out complex expressions
test/verify_line_and_column_numbers.py __validate_new_line 14 🙂 176 😞 14 😞 40.54% 😞 Try splitting into smaller methods. Extract out complex expressions
pymarkdown/leaf_block_processor.py LeafBlockProcessor.__process_fenced_start 6 ⭐ 187 😞 20 ⛔ 41.22% 😞 Try splitting into smaller methods. Extract out complex expressions
test/transform_to_markdown.py TransformToMarkdown.__perform_container_post_processing_block_quote 7 ⭐ 235 ⛔ 15 😞 41.32% 😞 Try splitting into smaller methods. Extract out complex expressions
pymarkdown/link_reference_definition_helper.py LinkReferenceDefinitionHelper.__parse_link_reference_definition 10 🙂 210 ⛔ 14 😞 41.36% 😞 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!

@jackdewinter jackdewinter merged commit 5ab751d into main Nov 21, 2021
@jackdewinter jackdewinter deleted the issue-143 branch November 21, 2021 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant