(filepath: str, extensions: List[str], exclude: List[str], include: List[str])
| 138 | |
| 139 | |
| 140 | def skip_file(filepath: str, extensions: List[str], exclude: List[str], include: List[str]) -> bool: |
| 141 | extension = filepath.split(".")[-1] |
| 142 | |
| 143 | if extension.lower() not in extensions: |
| 144 | return True |
| 145 | |
| 146 | if exclude and any([filepath.startswith(exc) for exc in exclude]): |
| 147 | print(exclude) |
| 148 | return True |
| 149 | |
| 150 | if include: |
| 151 | return not any([filepath.startswith(inc) for inc in include]) |
| 152 | |
| 153 | return False |
| 154 | |
| 155 | |
| 156 | if __name__ == "__main__": |
no test coverage detected