Conditions | 2 |
Total Lines | 20 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import os |
||
13 | def get_exclusions(): |
||
14 | with open('.gitignore', 'r') as f: |
||
15 | static_exclusions = [ |
||
16 | '.codecov.yml', |
||
17 | '.coveragerc', |
||
18 | '.travis.yml', |
||
19 | '.git', |
||
20 | '.gitignore', |
||
21 | 'build.py', |
||
22 | 'tox.ini', |
||
23 | 'jsons.egg-info', |
||
24 | '_config.yml', |
||
25 | ] |
||
26 | lines = [f'--exclude="./{l.strip()}"' |
||
27 | for l in f.readlines() + static_exclusions |
||
28 | if l.strip() |
||
29 | and '*' not in l |
||
30 | and '#' not in l |
||
31 | and not l.startswith('/')] |
||
32 | return ' '.join(lines) |
||
33 | |||
65 |