Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure newline at end of _modidx.py #1209

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nbdev/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,4 @@
'nbdev.sync.nbdev_update': ('api/sync.html#nbdev_update', 'nbdev/sync.py')},
'nbdev.test': { 'nbdev.test._keep_file': ('api/test.html#_keep_file', 'nbdev/test.py'),
'nbdev.test.nbdev_test': ('api/test.html#nbdev_test', 'nbdev/test.py'),
'nbdev.test.test_nb': ('api/test.html#test_nb', 'nbdev/test.py')}}}
'nbdev.test.test_nb': ('api/test.html#test_nb', 'nbdev/test.py')}}}
2 changes: 1 addition & 1 deletion nbdev/doclinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _build_modidx(dest=None, nbs_path=None, skip_exists=False):
code_root = dest.parent.resolve()
for file in globtastic(dest, file_glob="*.py", skip_file_re='^_', skip_folder_re="\.ipynb_checkpoints"):
res['syms'].update(_get_modidx((dest.parent/file).resolve(), code_root, nbs_path=nbs_path))
idxfile.write_text("# Autogenerated by nbdev\n\nd = "+pformat(res, width=140, indent=2, compact=True))
idxfile.write_text("# Autogenerated by nbdev\n\nd = "+pformat(res, width=140, indent=2, compact=True)+'\n')

# %% ../nbs/api/doclinks.ipynb 20
@delegates(globtastic)
Expand Down
2 changes: 1 addition & 1 deletion nbs/api/doclinks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
" code_root = dest.parent.resolve()\n",
" for file in globtastic(dest, file_glob=\"*.py\", skip_file_re='^_', skip_folder_re=\"\\.ipynb_checkpoints\"):\n",
" res['syms'].update(_get_modidx((dest.parent/file).resolve(), code_root, nbs_path=nbs_path))\n",
" idxfile.write_text(\"# Autogenerated by nbdev\\n\\nd = \"+pformat(res, width=140, indent=2, compact=True))"
" idxfile.write_text(\"# Autogenerated by nbdev\\n\\nd = \"+pformat(res, width=140, indent=2, compact=True)+'\\n')"
]
},
{
Expand Down