(
current_path, # type: str
final_path, # type: str
)
| 103 | |
| 104 | @contextmanager |
| 105 | def path_mapping( |
| 106 | current_path, # type: str |
| 107 | final_path, # type: str |
| 108 | ): |
| 109 | # type: (...) -> Iterator[None] |
| 110 | |
| 111 | _PATH_MAPPINGS[current_path] = final_path |
| 112 | try: |
| 113 | yield |
| 114 | finally: |
| 115 | _PATH_MAPPINGS.pop(current_path) |
| 116 | |
| 117 | |
| 118 | @contextmanager |