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

LeanderCS / flask-inputfilter / #68

16 Jan 2025 11:08PM CUT coverage: 99.252% (-0.09%) from 99.337%
#68

Pull #20

coveralls-python

LeanderCS
16 | Add functionality to filter and validate in a custom order
Pull Request #20: 16 | Add functionality to filter and validate in a custom order

16 of 17 new or added lines in 1 file covered. (94.12%)

1062 of 1070 relevant lines covered (99.25%)

0.99 hits per line

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

88.89
/flask_inputfilter/Filter/ArrayExplodeFilter.py
1
from typing import Any, List, Union
1✔
2

3
from .BaseFilter import BaseFilter
1✔
4

5

6
class ArrayExplodeFilter(BaseFilter):
1✔
7
    """
8
    Filter that splits a string into an array based on a specified delimiter.
9
    """
10

11
    def __init__(self, delimiter: str = ",") -> None:
1✔
12
        self.delimiter = delimiter
1✔
13

14
    def apply(self, value: Any) -> Union[List[str], Any]:
1✔
15
        if not isinstance(value, str):
1✔
16
            return value
×
17

18
        return value.split(self.delimiter)
1✔
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