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

fix #198: Keep the whole etymology #772

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Conversation

lasconic
Copy link
Collaborator

  • Fixes Keep the whole etymology #198
  • Tests added/updated.
  • ./check.sh run and eventual issues fixed.
  • Updated CONTRIBUTORS.md, if not already done in the past.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 27, 2021

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.34%.

Quality metrics Before After Change
Complexity 13.86 🙂 15.16 🙂 1.30 👎
Method Length 69.63 🙂 70.71 🙂 1.08 👎
Working memory 16.53 ⛔ 16.54 ⛔ 0.01 👎
Quality 58.08% 🙂 56.74% 🙂 -1.34% 👎
Other metrics Before After Change
Lines 3032 3141 109
Changed files Quality Before Quality After Quality Change
tests/test_4_check_word.py 93.24% ⭐ 93.27% ⭐ 0.03% 👍
tests/test_4_get_word.py 93.97% ⭐ 94.06% ⭐ 0.09% 👍
tests/test_ca.py 43.55% 😞 43.14% 😞 -0.41% 👎
tests/test_en.py 41.78% 😞 41.19% 😞 -0.59% 👎
tests/test_es.py 43.10% 😞 42.46% 😞 -0.64% 👎
tests/test_fr.py 35.55% 😞 35.11% 😞 -0.44% 👎
tests/test_pt.py 45.71% 😞 45.19% 😞 -0.52% 👎
wikidict/check_word.py 39.42% 😞 36.73% 😞 -2.69% 👎
wikidict/convert.py 51.90% 🙂 53.03% 🙂 1.13% 👍
wikidict/get_word.py 55.23% 🙂 48.15% 😞 -7.08% 👎
wikidict/render.py 49.78% 😞 46.95% 😞 -2.83% 👎
wikidict/utils.py 61.47% 🙂 60.97% 🙂 -0.50% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
wikidict/convert.py KoboFormat.save_html 69 ⛔ 326 ⛔ 20 ⛔ 7.88% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/check_word.py filter_html 42 ⛔ 293 ⛔ 16 ⛔ 16.08% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/render.py find_etymology 34 ⛔ 282 ⛔ 17 ⛔ 18.21% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/render.py find_section_definitions 54 ⛔ 228 ⛔ 13 😞 20.48% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/get_word.py get_and_parse_word 31 😞 233 ⛔ 16 ⛔ 22.86% ⛔ Refactor to reduce nesting. 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!

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

@BoboTiG BoboTiG merged commit cb0cf95 into BoboTiG:master Apr 28, 2021
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.

Keep the whole etymology
2 participants