You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
Review fixes
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
from contextlib import contextmanager
|
||||
import os
|
||||
from collections.abc import Generator
|
||||
from contextlib import contextmanager
|
||||
|
||||
|
||||
@contextmanager
|
||||
def change_directory(new_dir):
|
||||
def change_directory(new_dir: str) -> Generator[None, None, None]:
|
||||
"""
|
||||
Context manager for temporarily changing the current working directory.
|
||||
|
||||
Args:
|
||||
new_dir: Directory to change to
|
||||
|
||||
Example:
|
||||
with change_directory("/path/to/dir"):
|
||||
# Code here runs with the working directory as "/path/to/dir"
|
||||
# After the block, we return to the original directory
|
||||
:param new_dir: Directory to change to
|
||||
"""
|
||||
old_dir = os.getcwd()
|
||||
try:
|
||||
|
Reference in New Issue
Block a user