Fix include_bundles in extension static bundles and add type safety.

Review Request #13652 — Created March 20, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

Several years ago, during a Django upgrade, we updated the extension
static media template tag code to correctly join strings together for
loading bundles, using format_html_join instead of naively joining
strings. This was commit 080996bf0.

Part of this involved yielding tuples in a generator, but we missed some
yields. When using include_bundles, we ended up yielding strings and
not tuples of strings, and this broke the process by which they were
joined.

This fixes that issue, and adds type safety throughout the template tag
code.

Unit tests have also been updated to cover include_bundles, so it
doesn't regress.

Unit tests and type checkers pass.

Commits

Files