meadsteve / lagom

📦 Autowiring dependency injection container for python 3
https://lagom-di.readthedocs.io/en/latest/
MIT License
286 stars 15 forks source link

Raise an exception if an Awaitable is omitted in a type hint #207

Closed meadsteve closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.38 ⭐ 1.42 ⭐ 0.04 👎
Method Length 40.18 ⭐ 40.51 ⭐ 0.33 👎
Working memory 3.41 ⭐ 3.48 ⭐ 0.07 👎
Quality 86.45% 86.38% -0.07% 👎
Other metrics Before After Change
Lines 754 805 51
Changed files Quality Before Quality After Quality Change
lagom/container.py 81.98% ⭐ 81.62% ⭐ -0.36% 👎
lagom/exceptions.py 91.21% ⭐ 90.80% ⭐ -0.41% 👎
lagom/util/reflection.py 84.85% ⭐ 85.77% ⭐ 0.92% 👍
tests/test_async_definitions_can_be_used.py 94.31% ⭐ 94.07% ⭐ -0.24% 👎
tests/test_dep_definition_functions.py 92.60% ⭐ 92.25% ⭐ -0.35% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
lagom/container.py _infer_dependencies 3 ⭐ 97 🙂 11 😞 64.53% 🙂 Extract out complex expressions
lagom/container.py partial 1 ⭐ 139 😞 70.09% 🙂 Try splitting into smaller methods

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!