drivendataorg / deon

A command line tool to easily add an ethics checklist to your data science projects.
https://deon.drivendata.org/
MIT License
288 stars 52 forks source link

Fix HTML appending for beautifulsoup4 >= 4.12.1 #163

Closed jayqi closed 1 year ago

jayqi commented 1 year ago

Changes Html.write in the append case to use the extend method on the Beautiful Soup tag directly, rather than extend on the contents list. Beautiful Soup's documentation says that modifying contents is not the intended way to modify soups. See this comment for references.

The Tag.extend method was added in version 4.7.0, so this PR also bumps up the dependency floor to that.

Closes #161

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (936791c) 96.80% compared to head (f0ee1bf) 96.80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #163 +/- ## ======================================= Coverage 96.80% 96.80% ======================================= Files 6 6 Lines 188 188 ======================================= Hits 182 182 Misses 6 6 ``` | [Impacted Files](https://codecov.io/gh/drivendataorg/deon/pull/163?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drivendataorg) | Coverage Δ | | |---|---|---| | [deon/formats.py](https://codecov.io/gh/drivendataorg/deon/pull/163?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drivendataorg#diff-ZGVvbi9mb3JtYXRzLnB5) | `98.95% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drivendataorg). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drivendataorg)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.