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

zostera / django-icons / 10511750201

22 Aug 2024 04:11PM UTC coverage: 96.869%. First build
10511750201

Pull #534

github

web-flow
Bump ruff from 0.6.1 to 0.6.2

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.1 to 0.6.2.
- [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/0.6.1...0.6.2)

---
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 #534: Bump ruff from 0.6.1 to 0.6.2

100 of 105 branches covered (95.24%)

Branch coverage included in aggregate %.

395 of 406 relevant lines covered (97.29%)

9.7 hits per line

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

100.0
/src/django_icons/css.py
1
def _merge_css_item(item):
10✔
2
    """Transform argument into a list with a single string value."""
3
    if isinstance(item, (list, tuple)):
10✔
4
        return _merge_css_list(*item)
10✔
5
    item = f"{item}" if item else ""
10✔
6
    return [item]
10✔
7

8

9
def _merge_css_list(*args):
10✔
10
    """Transform arguments into a list of string values."""
11
    css_list = []
10✔
12
    for arg in args:
10✔
13
        css_list += _merge_css_item(arg)
10✔
14
    return css_list
10✔
15

16

17
def merge_css_list(*args):
10✔
18
    """
19
    Combine a series of strings and lists into a single list of unique CSS classes.
20

21
    Removes duplicates. Gives precedence to first class encountered.
22
    """
23
    css_string = " ".join(_merge_css_list(*args))  # Create single string
10✔
24
    css_list = css_string.split()  # Split it to remove all whitespace
10✔
25
    css_list = filter(None, css_list)  # Remove empty strings
10✔
26
    # Remove duplicates, see https://stackoverflow.com/questions/480214/
27
    return list(dict.fromkeys(css_list))
10✔
28

29

30
def merge_css_text(*args):
10✔
31
    """
32
    Combine a series of strings and lists into one space separated string of unique CSS classes.
33

34
    Removes duplicates. Gives precedence to first class encountered.
35
    """
36
    return " ".join(merge_css_list(*args))
10✔
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