MongoEngine / flask-mongoengine

MongoEngine flask extension with WTF model forms support
Other
841 stars 254 forks source link

Changed: Tests: treat all warnings as errors (#498) #505

Closed insspb 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.03%.

Quality metrics Before After Change
Complexity 0.40 ⭐ 0.40 ⭐ 0.00
Method Length 72.95 🙂 73.48 🙂 0.53 👎
Working memory 5.00 ⭐ 5.00 ⭐ 0.00
Quality 72.60% 🙂 72.57% 🙂 -0.03% 👎
Other metrics Before After Change
Lines 329 330 1
Changed files Quality Before Quality After Quality Change
tests/test_forms_v2.py 75.73% ⭐ 75.71% ⭐ -0.02% 👎
tests/test_json_app.py 66.39% 🙂 66.35% 🙂 -0.04% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
tests/test_forms_v2.py test__full_document_form__does_not_create_any_unexpected_data_in_database 0 ⭐ 461 ⛔ 6 ⭐ 59.54% 🙂 Try splitting into smaller methods
tests/test_json_app.py setup_endpoints 0 ⭐ 206 ⛔ 62.35% 🙂 Try splitting into smaller methods
tests/test_json_app.py test_basic_insert 3 ⭐ 155 😞 7 🙂 66.02% 🙂 Try splitting into smaller methods
tests/test_json_app.py test_with_id 0 ⭐ 129 😞 7 🙂 71.90% 🙂 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!