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

Space cleanup #481

Merged
merged 34 commits into from
Sep 16, 2022
Merged

Space cleanup #481

merged 34 commits into from
Sep 16, 2022

Conversation

jackdewinter
Copy link
Owner

closes #480

jackdewinter and others added 30 commits August 27, 2022 20:16
Co-authored-by: Sourcery AI <>
…and __rehydrate_list_start_contained_in_list_deeper_block_quote
…line_ending, parse_fenced_code_block, __adjust_containers_before_leaf_blocks
Co-authored-by: Sourcery AI <>
Co-authored-by: Sourcery AI <>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 16, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.27 ⭐ 0.96 ⭐ -0.31 👍
Method Length 36.63 ⭐ 35.22 ⭐ -1.41 👍
Working memory 5.06 ⭐ 4.75 ⭐ -0.31 👍
Quality 87.75% 89.43% 1.68% 👍
Other metrics Before After Change
Lines 3457 4744 1287
Changed files Quality Before Quality After Quality Change
pymarkdown/constants.py 97.51% ⭐ 97.51% ⭐ 0.00%
pymarkdown/emphasis_helper.py 61.08% 🙂 61.77% 🙂 0.69% 👍
test/gfm/test_markdown_whitespaces.py 93.67% ⭐ 93.66% ⭐ -0.01% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
pymarkdown/emphasis_helper.py EmphasisHelper.__is_open_close_emphasis_valid 17 🙂 129 😞 13 😞 44.42% 😞 Try splitting into smaller methods. Extract out complex expressions
pymarkdown/emphasis_helper.py EmphasisHelper.resolve_inline_emphasis 12 🙂 147 😞 12 😞 48.10% 😞 Try splitting into smaller methods. Extract out complex expressions
pymarkdown/emphasis_helper.py EmphasisHelper.__mark_used_tokens 9 🙂 186 😞 11 😞 48.84% 😞 Try splitting into smaller methods. Extract out complex expressions
pymarkdown/emphasis_helper.py EmphasisHelper.__process_emphasis_pair 3 ⭐ 169 😞 10 😞 58.03% 🙂 Try splitting into smaller methods. Extract out complex expressions
pymarkdown/emphasis_helper.py EmphasisHelper.__is_potential_closer 6 ⭐ 100 🙂 10 😞 63.07% 🙂 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!

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (39231fe) compared to base (a08a158).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #481   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          107       107           
  Lines        12566     12560    -6     
  Branches      1774      1774           
=========================================
- Hits         12566     12560    -6     
Impacted Files Coverage Δ
pymarkdown/constants.py 100.00% <ø> (ø)
pymarkdown/emphasis_helper.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jackdewinter jackdewinter merged commit 7aed054 into main Sep 16, 2022
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.

Added test cases for whitespace and Unicode punctuation with emphasis.
1 participant