| Conditions | 5 |
| Total Lines | 11 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os.path |
||
| 15 | def cache_files(file_list): |
||
| 16 | for file_ in file_list: |
||
| 17 | dirname, fn = os.path.split(file_) |
||
| 18 | cache_dir = os.path.join(dirname, "__pycache__") |
||
| 19 | try: |
||
| 20 | cache_files = os.listdir(cache_dir) |
||
| 21 | except FileNotFoundError: |
||
| 22 | continue |
||
| 23 | for cache_file in cache_files: |
||
| 24 | if cache_file.startswith(fn): |
||
| 25 | yield os.path.join(cache_dir, cache_file) |
||
| 26 | |||
| 32 |