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

zostera / django-bootstrap4 / 7527075746

15 Jan 2024 09:49AM CUT coverage: 91.069%. First build
7527075746

Pull #670

github

web-flow
Bump ruff from 0.1.12 to 0.1.13

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.12...v0.1.13)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #670: Bump ruff from 0.1.12 to 0.1.13

322 of 394 branches covered (0.0%)

Branch coverage included in aggregate %.

1279 of 1364 relevant lines covered (93.77%)

14.94 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
16✔
2
from django.utils.translation import gettext as _
16✔
3

4
from bootstrap4.utils import render_tag
16✔
5

6
from .text import text_value
16✔
7

8

9
def render_alert(content, alert_type=None, dismissible=True):
16✔
10
    """Render a Bootstrap alert."""
11
    button = ""
16✔
12
    if not alert_type:
16✔
13
        alert_type = "info"
16✔
14
    css_classes = ["alert", "alert-" + text_value(alert_type)]
16✔
15
    if dismissible:
16!
16
        css_classes.append("alert-dismissible")
16✔
17
        close = _("close")
16✔
18
        button = f'<button type="button" class="close" data-dismiss="alert" aria-label="{close}">&times;</button>'
16✔
19
    button_placeholder = "__BUTTON__"
16✔
20
    return mark_safe(
16✔
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