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

[IT] Support langs single template #1626

Merged
merged 2 commits into from
Jan 19, 2023
Merged

[IT] Support langs single template #1626

merged 2 commits into from
Jan 19, 2023

Conversation

BoboTiG
Copy link
Owner

@BoboTiG BoboTiG commented Jan 19, 2023

Fixes #1625

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 19, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 8.24 ⭐ 7.79 ⭐ -0.45 👍
Method Length 60.09 ⭐ 59.33 ⭐ -0.76 👍
Working memory 7.37 🙂 7.35 🙂 -0.02 👍
Quality 66.23% 🙂 67.16% 🙂 0.93% 👍
Other metrics Before After Change
Lines 240 261 21
Changed files Quality Before Quality After Quality Change
scripts/__main__.py 83.31% ⭐ 83.30% ⭐ -0.01% 👎
wikidict/check_words.py 45.26% 😞 45.04% 😞 -0.22% 👎
wikidict/lang/it/__init__.py 83.03% ⭐ 82.96% ⭐ -0.07% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
wikidict/check_words.py main 18 🙂 199 😞 10 😞 42.05% 😞 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!

@@ -44,7 +44,7 @@ def main(locale: str, count: int, random: bool, offset: str, input: str) -> int:
all_words = all_words[i:]
break

count = min(count, len(all_words))
all_words = all_words[: min(count, len(all_words))]
Copy link
Owner Author

Choose a reason for hiding this comment

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

FTR @lasconic ⬆️

@BoboTiG BoboTiG merged commit 9179dcd into master Jan 19, 2023
@BoboTiG BoboTiG deleted the fix-1625 branch January 19, 2023 20:55
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.

[IT] Support langs single template
1 participant