From aed28865f2df3a08657de6cde3a7843d5446f4ac Mon Sep 17 00:00:00 2001 From: Hamel Husain Date: Thu, 19 Sep 2024 20:53:10 -0700 Subject: [PATCH] delete code --- nbdev/config.py | 3 ++- nbs/api/01_config.ipynb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nbdev/config.py b/nbdev/config.py index b68983e48..72b735873 100644 --- a/nbdev/config.py +++ b/nbdev/config.py @@ -181,7 +181,8 @@ def nbdev_create_config( # %% ../nbs/api/01_config.ipynb def _nbdev_config_file(cfg_name=_nbdev_cfg_name, path=None): - return getattr(Config.find(cfg_name), 'config_file', Path.cwd()/cfg_name) + cfg_path = Path.cwd() if path is None else Path(path) + return getattr(Config.find(cfg_name), 'config_file', cfg_path/cfg_name) # %% ../nbs/api/01_config.ipynb def _xdg_config_paths(cfg_name=_nbdev_cfg_name): diff --git a/nbs/api/01_config.ipynb b/nbs/api/01_config.ipynb index 2b73730ed..465e266bd 100644 --- a/nbs/api/01_config.ipynb +++ b/nbs/api/01_config.ipynb @@ -402,7 +402,8 @@ "source": [ "#|export\n", "def _nbdev_config_file(cfg_name=_nbdev_cfg_name, path=None):\n", - " return getattr(Config.find(cfg_name), 'config_file', Path.cwd()/cfg_name)" + " cfg_path = Path.cwd() if path is None else Path(path)\n", + " return getattr(Config.find(cfg_name), 'config_file', cfg_path/cfg_name)" ] }, {