Conditions | 3 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | """Filters for generating random data.""" |
||
6 | def bs3_cols(num_entries): |
||
7 | """Return the appropriate bootstrap framework column width. |
||
8 | |||
9 | Args: |
||
10 | num_entries (int): The number of entries to determine column width for. |
||
11 | |||
12 | Returns: |
||
13 | int: The integer value for column width. |
||
14 | """ |
||
15 | if not isinstance(num_entries, int): |
||
16 | return 12 |
||
17 | mappings = { |
||
18 | 1: 12, |
||
19 | 2: 6, |
||
20 | 3: 4, |
||
21 | 4: 3, |
||
22 | 5: 2, |
||
23 | 6: 2, |
||
24 | } |
||
25 | try: |
||
26 | return mappings[num_entries] |
||
27 | except KeyError: |
||
28 | return 12 |
||
29 |