Skip to content

Commit

Permalink
delete code
Browse files Browse the repository at this point in the history
  • Loading branch information
hamelsmu committed Sep 20, 2024
1 parent d4d2b28 commit 02dfd8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions nbdev/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ def nbdev_create_config(

# %% ../nbs/api/01_config.ipynb
def _nbdev_config_file(cfg_name=_nbdev_cfg_name, path=None):
cfg_path = path = Path.cwd() if path is None else Path(path)
while cfg_path != cfg_path.parent and not (cfg_path/cfg_name).exists(): cfg_path = cfg_path.parent
if not (cfg_path/cfg_name).exists(): cfg_path = path
return cfg_path/cfg_name
return getattr(Config.find(cfg_name), 'config_file', Path.cwd()/cfg_name)

# %% ../nbs/api/01_config.ipynb
def _xdg_config_paths(cfg_name=_nbdev_cfg_name):
Expand Down
5 changes: 1 addition & 4 deletions nbs/api/01_config.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,7 @@
"source": [
"#|export\n",
"def _nbdev_config_file(cfg_name=_nbdev_cfg_name, path=None):\n",
" cfg_path = path = Path.cwd() if path is None else Path(path)\n",
" while cfg_path != cfg_path.parent and not (cfg_path/cfg_name).exists(): cfg_path = cfg_path.parent\n",
" if not (cfg_path/cfg_name).exists(): cfg_path = path\n",
" return cfg_path/cfg_name"
" return getattr(Config.find(cfg_name), 'config_file', Path.cwd()/cfg_name)"
]
},
{
Expand Down

0 comments on commit 02dfd8d

Please sign in to comment.