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

New model form generator: Support of BinaryField, FileField, ImageField #511

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

insspb
Copy link
Collaborator

@insspb insspb commented Aug 16, 2022

No description provided.

@insspb insspb added the log:added Changelog mark label. Marks new added features. label Aug 16, 2022
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 16, 2022

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.98 ⭐ 1.05 ⭐ 0.07 👎
Method Length 50.82 ⭐ 50.18 ⭐ -0.64 👍
Working memory 6.16 ⭐ 6.20 🙂 0.04 👎
Quality 82.24% 82.21% -0.03% 👎
Other metrics Before After Change
Lines 2295 2313 18
Changed files Quality Before Quality After Quality Change
example_app/app.py 44.42% 😞 42.50% 😞 -1.92% 👎
example_app/boolean_demo.py 88.03% ⭐ 90.84% ⭐ 2.81% 👍
example_app/dates_demo.py 77.71% ⭐ 80.65% ⭐ 2.94% 👍
example_app/dict_demo.py 88.11% ⭐ 90.74% ⭐ 2.63% 👍
example_app/numbers_demo.py 83.54% ⭐ 86.51% ⭐ 2.97% 👍
example_app/strings_demo.py 80.54% ⭐ 81.45% ⭐ 0.91% 👍
example_app/views.py 75.49% ⭐ 73.89% 🙂 -1.60% 👎
flask_mongoengine/db_fields.py 84.13% ⭐ 84.20% ⭐ 0.07% 👍
flask_mongoengine/wtf/fields.py 80.22% ⭐ 80.55% ⭐ 0.33% 👍
tests/test_db_fields.py 84.58% ⭐ 84.59% ⭐ 0.01% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
flask_mongoengine/db_fields.py StringField.__init__ 6 ⭐ 111 🙂 14 😞 54.98% 🙂 Extract out complex expressions
flask_mongoengine/db_fields.py WtfFieldMixin.__init__ 5 ⭐ 131 😞 12 😞 56.45% 🙂 Try splitting into smaller methods. Extract out complex expressions
flask_mongoengine/wtf/fields.py MongoDictField.__init__ 6 ⭐ 120 😞 11 😞 58.55% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_db_fields.py TestNumberFieldCommons.test__init__method__set_number_range_validator__if_range_given 0 ⭐ 105 🙂 11 😞 66.43% 🙂 Extract out complex expressions
example_app/views.py generate_data 1 ⭐ 232 ⛔ 5 ⭐ 66.91% 🙂 Try splitting into smaller methods

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!

@insspb insspb changed the title New model form generator: Support of BinaryField New model form generator: Support of BinaryField, FileField, ImageField Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
log:added Changelog mark label. Marks new added features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant