| Conditions | 5 |
| Total Lines | 12 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os.path |
||
| 22 | def cache_files(file_list): |
||
| 23 | for file_ in file_list: |
||
| 24 | dirname, fn = os.path.split(file_) |
||
| 25 | cache_dir = os.path.join(dirname, "__pycache__") |
||
| 26 | prefix = fn + os.extsep |
||
| 27 | try: |
||
| 28 | cache_files = os.listdir(cache_dir) |
||
| 29 | except FileNotFoundError: |
||
| 30 | continue |
||
| 31 | for cache_file in cache_files: |
||
| 32 | if cache_file.startswith(prefix): |
||
| 33 | yield os.path.join(cache_dir, cache_file) |
||
| 34 | |||
| 38 |