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 #643: [FR] Add support for the 'ar-cf' template #1738

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

lasconic
Copy link
Collaborator

Fixes #643

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 31, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 104.29 ⛔ 218.01 ⛔ 113.72 👎
Method Length 312.91 ⛔ 521.50 ⛔ 208.59 👎
Working memory 24.82 ⛔ 34.86 ⛔ 10.04 👎
Quality 19.05% 10.90% -8.15% 👎
Other metrics Before After Change
Lines 1740 2530 790
Changed files Quality Before Quality After Quality Change
scripts/__main__.py 83.28% ⭐ 83.26% ⭐ -0.02% 👎
wikidict/lang/fr/__init__.py 19.48% ⛔ 16.55% ⛔ -2.93% 👎
wikidict/lang/fr/arabiser.py 0.92% ⛔ 4.08% ⛔ 3.16% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
wikidict/lang/fr/arabiser.py appliquer 343 ⛔ 3576 ⛔ 46 ⛔ 0.07% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/lang/fr/arabiser.py arabiser 189 ⛔ 1069 ⛔ 39 ⛔ 0.21% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/lang/fr/__init__.py last_template_handler 76 ⛔ 701 ⛔ 23 ⛔ 3.37% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
wikidict/lang/fr/arabiser.py nature 20 😞 156 😞 8 🙂 48.66% 😞 Refactor to reduce nesting. Try splitting into smaller methods

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!

@BoboTiG
Copy link
Owner

BoboTiG commented Jan 31, 2023

That's awesome.
(I thought you would have introduced a lua2python script :trollface:)

@lasconic
Copy link
Collaborator Author

Oh man... I thought about it but concluded it needs more than just regexp and string processing...
I should have asked chatGPT :) Let's me try it when he is back online.

@lasconic lasconic merged commit d625960 into BoboTiG:master Jan 31, 2023
@BoboTiG
Copy link
Owner

BoboTiG commented Jan 31, 2023

Oh chatGPT! It could be interestring to see what will come out :)

@lasconic
Copy link
Collaborator Author

It's not that bad :) Trying with ar-IPA and ar-translit. I will report there.

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.

[FR] Add support for the 'ar-cf' template
2 participants