Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Feb 8, 2023

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Vioshim February 8, 2023 06:39
i += 1
continue

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function parse_tokens_generator refactored with the following changes:

This removes the following comments ( why? ):

# there must be at least one other non-empty line
# treat all children token as inline text
# (the content doesn't matter, there just has to be one)

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Feb 8, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 62.29 ⛔ 52.29 ⛔ -10.00 👍
Method Length 164.00 😞 163.38 😞 -0.62 👍
Working memory 16.58 ⛔ 16.45 ⛔ -0.13 👍
Quality 23.53% 24.60% 1.07% 👍
Other metrics Before After Change
Lines 463 456 -7
Changed files Quality Before Quality After Quality Change
discord_markdown_ast_parser/parser.py 23.53% ⛔ 24.60% ⛔ 1.07% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
discord_markdown_ast_parser/parser.py parse_tokens_generator 72 ⛔ 806 ⛔ 20 ⛔ 5.02% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
discord_markdown_ast_parser/parser.py try_parse_node_with_children 5 ⭐ 126 😞 10 😞 60.68% 🙂 Try splitting into smaller methods. Extract out complex expressions
discord_markdown_ast_parser/parser.py merge_text_nodes 11 🙂 64 🙂 10 😞 63.66% 🙂 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!

@Vioshim Vioshim merged commit de61679 into master Oct 28, 2024
@Vioshim Vioshim deleted the sourcery/master branch October 28, 2024 16:04
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.

2 participants