kiwicom / the-zoo

πŸ’ A service registry for humans
MIT License
93 stars 6 forks source link

refactor(hangar): Use of generics for unwrap func #347

Closed batisteo closed 3 years ago

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert and fixes 1 when merging 11aeeff4b60af45724c4bfcd1d497bee4419161e into 4fef134a0c16fb3c95578869d09bb0da2dedd08f - view on LGTM.com

new alerts:

fixed alerts:

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

88.9% 88.9% Coverage
0.0% 0.0% Duplication

lgtm-com[bot] commented 3 years ago

This pull request fixes 1 alert when merging e6c0ab9f02a96a3818a526954c37941db75e5df1 into 4fef134a0c16fb3c95578869d09bb0da2dedd08f - view on LGTM.com

fixed alerts:

ghost commented 3 years ago

DeepCode's analysis on #c60958 found:

Description Example fixes
Array type using 'Array' is forbidden for simple types. Use 'T[]' instead. Occurrences: :wrench: Example fixes

πŸ‘‰ View analysis in DeepCode’s Dashboard | Configure the bot

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.65 ⭐ 0.65 ⭐ 0.00
Method Length 43.80 ⭐ 44.05 ⭐ 0.25 πŸ‘Ž
Working memory 11.65 😞 11.78 😞 0.13 πŸ‘Ž
Quality 72.34% πŸ™‚ 71.93% πŸ™‚ -0.41% πŸ‘Ž
Other metrics Before After Change
Lines 655 658 3
Changed files Quality Before Quality After Quality Change
test/api/query/test_node.py 79.46% ⭐ 79.46% ⭐ 0.00%
test/api/query/snapshots/snap_test_node.py 55.16% πŸ™‚ 52.77% πŸ™‚ -2.39% πŸ‘Ž
zoo/factories.py 51.95% πŸ™‚ 51.49% πŸ™‚ -0.46% πŸ‘Ž
zoo/api/types.py 83.55% ⭐ 82.86% ⭐ -0.69% πŸ‘Ž
zoo/base/management/commands/fake.py 75.58% ⭐ 75.58% ⭐ 0.00%
zoo/services/managers.py 71.40% πŸ™‚ 72.01% πŸ™‚ 0.61% πŸ‘

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

File Function Complexity Length Working Memory Quality Recommendation
zoo/services/managers.py SentryIssueQuerySet.generate_sentry_histogram 5 ⭐ 96 πŸ™‚ 15 😞 56.72% πŸ™‚ Extract out complex expressions
zoo/api/types.py Dependency.resolve_all_dependency_usages 1 ⭐ 92 πŸ™‚ 11 😞 67.22% πŸ™‚ Extract out complex expressions
zoo/api/types.py PagerdutyInfo.resolve_all_active_incidents 1 ⭐ 75 πŸ™‚ 11 😞 69.70% πŸ™‚ Extract out complex expressions
test/api/query/test_node.py test_issue 0 ⭐ 50 ⭐ 14 😞 69.87% πŸ™‚ Extract out complex expressions
zoo/api/types.py Service.from_db 0 ⭐ 40 ⭐ 12 😞 74.47% πŸ™‚ 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!

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

lgtm-com[bot] commented 3 years ago

This pull request fixes 1 alert when merging c609584ab0ce72bee0c713274db7d64db0f6bde9 into 4fef134a0c16fb3c95578869d09bb0da2dedd08f - view on LGTM.com

fixed alerts: