Florian-DELRIEU / HOI4_Calculator

Land battle simulator for Heart of Iron IV and Warhammer 40k
1 stars 0 forks source link

DEF-BRK little MAJ #35

Closed Florian-DELRIEU closed 2 years ago

Florian-DELRIEU commented 2 years ago

Changelog here

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.41 ⭐ 7.46 ⭐ 0.05 👎
Method Length 70.59 🙂 72.73 🙂 2.14 👎
Working memory 10.69 😞 10.88 😞 0.19 👎
Quality 61.08% 🙂 59.96% 🙂 -1.12% 👎
Other metrics Before After Change
Lines 707 706 -1
Changed files Quality Before Quality After Quality Change
W40K/Class/Company.py 76.80% ⭐ 76.30% ⭐ -0.50% 👎
W40K/Class/Unit.py 70.49% 🙂 69.13% 🙂 -1.36% 👎
W40K/Functions/Companies_bonuses.py 32.86% 😞 32.86% 😞 0.00%
W40K/Functions/Stats_Functions.py 63.26% 🙂 61.37% 🙂 -1.89% 👎
W40K/Functions/Weapons_bonuses.py 37.17% 😞 36.73% 😞 -0.44% 👎
W40K/Lists/Unit_list.py 54.12% 🙂 54.19% 🙂 0.07% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
W40K/Functions/Companies_bonuses.py setCompanies_DEFBRK_bonus 22 😞 215 ⛔ 13 😞 32.86% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
W40K/Functions/Weapons_bonuses.py setWeapons_SAHA_bonus 21 😞 221 ⛔ 13 😞 33.14% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
W40K/Functions/Weapons_bonuses.py setWeapons_DEFBRK_bonus 13 🙂 178 😞 13 😞 42.63% 😞 Try splitting into smaller methods. Extract out complex expressions
W40K/Functions/Stats_Functions.py setHMA 17 🙂 129 😞 14 😞 43.01% 😞 Try splitting into smaller methods. Extract out complex expressions
W40K/Functions/Stats_Functions.py setHardness 20 😞 117 🙂 11 😞 46.96% 😞 Refactor to reduce nesting. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!