marksweb / django-bleach

Bleach is a Python module that takes any HTML input, and returns valid, sanitised HTML that contains only an allowed subset of HTML tags, attributes and styles. django-bleach is a Django app that makes using bleach extremely easy.
MIT License
148 stars 23 forks source link

Respect form_class argument to support form field overrides #26

Closed MrkGrgsn closed 3 years ago

MrkGrgsn commented 3 years ago

Modifies the model field so the formfield method accepts an optional form_class argument as the Field parent class does and calls super() in all cases.

References

Fixes #25

Checklist

codecov[bot] commented 3 years ago

Codecov Report

Merging #26 (bae1fa3) into master (42e92f6) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #26   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           81        80    -1     
  Branches        16        16           
=========================================
- Hits            81        80    -1     
Impacted Files Coverage Δ
models.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 42e92f6...bae1fa3. Read the comment docs.

MrkGrgsn commented 3 years ago

Let me know what you want me to do about the 2 issues raised by Codacy. The complaint about the ellipsis seems pointless and the method signature is compatible with the parent class despite the warning since choices_form_class will be passed through if provided.