Function
check_keywords
(lines,keywords,black_keywords)
Source from the content-addressed store, hash-verified
| 42 | return True |
| 43 | |
| 44 | def check_keywords(lines,keywords,black_keywords): |
| 45 | match = [] |
| 46 | for l in lines: |
| 47 | black = False |
| 48 | for bk in black_keywords: |
| 49 | if l.find(bk) >= 0: |
| 50 | black = True |
| 51 | break |
| 52 | if black: |
| 53 | continue |
| 54 | flag = True |
| 55 | for k in keywords: |
| 56 | flag = flag and (l.find(k) >= 0) |
| 57 | if flag: |
| 58 | #print("matched line: ",l) |
| 59 | match.append(l) |
| 60 | return len(match) |
| 61 | |
| 62 | class Envs: |
| 63 | def __init__(self,f = ""): |
Callers
nothing calls this directly
Tested by
no test coverage detected