From 04c804a5065c956c3aa878d7d7aa3ddc2ec166cc 2020-06-09 13:04:27 From: Brett Smith Date: 2020-06-09 13:04:27 Subject: [PATCH] books: Remove unused workdir() function. --- diff --git a/conservancy_beancount/books.py b/conservancy_beancount/books.py index 86e4d288a30ac2b75decd13206890e9e03f31396..6a46050a30f3cd7c39c03498298148fb87dbb8ec 100644 --- a/conservancy_beancount/books.py +++ b/conservancy_beancount/books.py @@ -14,9 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import contextlib import datetime -import os from pathlib import Path @@ -38,15 +36,6 @@ from .beancount_types import ( PathLike = Union[str, Path] Year = Union[int, datetime.date] -@contextlib.contextmanager -def workdir(path: PathLike) -> Iterator[Path]: - old_dir = os.getcwd() - os.chdir(path) - try: - yield Path(old_dir) - finally: - os.chdir(old_dir) - class FiscalYear(NamedTuple): month: int = 3 day: int = 1