• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zostera / django-bootstrap4 / 7126543600

07 Dec 2023 09:58AM UTC coverage: 85.84%. Remained the same
7126543600

Pull #657

github

web-flow
Bump actions/setup-python from 4 to 5

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #657: Bump actions/setup-python from 4 to 5

272 of 344 branches covered (0.0%)

Branch coverage included in aggregate %.

704 of 793 relevant lines covered (88.78%)

3.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.74
/src/bootstrap4/components.py
1
from django.utils.safestring import mark_safe
4✔
2
from django.utils.translation import gettext as _
4✔
3

4
from bootstrap4.utils import render_tag
4✔
5

6
from .text import text_value
4✔
7

8

9
def render_alert(content, alert_type=None, dismissible=True):
4✔
10
    """Render a Bootstrap alert."""
11
    button = ""
4✔
12
    if not alert_type:
4✔
13
        alert_type = "info"
4✔
14
    css_classes = ["alert", "alert-" + text_value(alert_type)]
4✔
15
    if dismissible:
4!
16
        css_classes.append("alert-dismissible")
4✔
17
        close = _("close")
4✔
18
        button = f'<button type="button" class="close" data-dismiss="alert" aria-label="{close}">&times;</button>'
4✔
19
    button_placeholder = "__BUTTON__"
4✔
20
    return mark_safe(
4✔
21
        render_tag(
22
            "div",
23
            attrs={"class": " ".join(css_classes), "role": "alert"},
24
            content=mark_safe(button_placeholder) + text_value(content),
25
        ).replace(button_placeholder, button)
26
    )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc