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

zostera / django-icons / 7614203720

22 Jan 2024 04:23PM CUT coverage: 97.047%. First build
7614203720

Pull #431

github

web-flow
Bump ruff from 0.1.13 to 0.1.14

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.13 to 0.1.14.
- [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.13...v0.1.14)

---
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 #431: Bump ruff from 0.1.13 to 0.1.14

98 of 103 branches covered (0.0%)

Branch coverage included in aggregate %.

395 of 405 relevant lines covered (97.53%)

15.59 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):
16✔
2
    """Transform argument into a list with a single string value."""
3
    if isinstance(item, (list, tuple)):
16✔
4
        return _merge_css_list(*item)
16✔
5
    item = f"{item}" if item else ""
16✔
6
    return [item]
16✔
7

8

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

16

17
def merge_css_list(*args):
16✔
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
16✔
24
    css_list = css_string.split()  # Split it to remove all whitespace
16✔
25
    css_list = filter(None, css_list)  # Remove empty strings
16✔
26
    # Remove duplicates, see https://stackoverflow.com/questions/480214/
27
    return list(dict.fromkeys(css_list))
16✔
28

29

30
def merge_css_text(*args):
16✔
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))
16✔
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