Skip to content

Commit

Permalink
Add a documentation string for working_directory().
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Apr 1, 2021
1 parent d7ed6b1 commit 5391bcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vimgolf/vimgolf.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ def find_executable(executable):

@contextlib.contextmanager
def working_directory(directory):
"""A context manager that temporarily changes the working directory."""
existing = os.getcwd()
os.chdir(directory)
try:
Expand Down

0 comments on commit 5391bcb

Please sign in to comment.