Skip to content

Commit 3e8f6ae

Browse files
committed
fixes #1452
1 parent 0bb7b5d commit 3e8f6ae

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

nbdev/migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _re_v1():
112112
d += L(get_config().tst_flags).filter()
113113
d += [s.replace('_', '-') for s in d] # allow for hyphenated version of old directives
114114
_tmp = '|'.join(list(set(d)))
115-
return re.compile(f"^[ \f\v\t]*?(#)\s*({_tmp})(?!\S)", re.MULTILINE)
115+
return re.compile(fr"^[ \f\v\t]*?(#)\s*({_tmp})(?!\S)", re.MULTILINE)
116116

117117
def _repl_directives(code_str):
118118
def _fmt(x): return f"#| {_subv1(x[2].replace('-', '_').strip())}"

nbdev/processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def rm_export(cell):
206206
def _is_showdoc(cell): return cell['cell_type'] == 'code' and _re_showdoc.search(cell.source)
207207
def _add_directives(cell, d):
208208
for k,v in d.items():
209-
if not re.findall(f'#\| *{k}:', cell.source): cell.source = f'#| {k}: {v}\n' + cell.source
209+
if not re.findall(fr'#\| *{k}:', cell.source): cell.source = f'#| {k}: {v}\n' + cell.source
210210

211211
def clean_show_doc(cell):
212212
"Remove ShowDoc input cells"

nbdev/quarto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def nbdev_sidebar(
110110
path:str=None, # Path to notebooks
111111
printit:bool=False, # Print YAML for debugging
112112
force:bool=False, # Create sidebar even if settings.ini custom_sidebar=False
113-
skip_folder_re:str='(?:^[_.]|^www\$)', # Skip folders matching regex
113+
skip_folder_re:str=r'(?:^[_.]|^www\$)', # Skip folders matching regex
114114
**kwargs):
115115
"Create sidebar.yml"
116116
if not force and get_config().custom_sidebar: return

nbdev/release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def release_conda(
288288
if skip_upload: return print(loc)
289289
if not upload_user: upload_user = get_config().conda_user
290290
if not upload_user: return print("`conda_user` not in settings.ini and no `upload_user` passed. Cannot upload")
291-
if 'anaconda upload' not in res: return print(f"{res}\n\Failed. Check auto-upload not set in .condarc. Try `--do_build False`.")
291+
if 'anaconda upload' not in res: return print(f"{res}\n\nFailed. Check auto-upload not set in .condarc. Try `--do_build False`.")
292292
return anaconda_upload(name, loc)
293293

294294
# %% ../nbs/api/18_release.ipynb

nbs/api/10_processors.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@
660660
"def _is_showdoc(cell): return cell['cell_type'] == 'code' and _re_showdoc.search(cell.source)\n",
661661
"def _add_directives(cell, d):\n",
662662
" for k,v in d.items():\n",
663-
" if not re.findall(f'#\\| *{k}:', cell.source): cell.source = f'#| {k}: {v}\\n' + cell.source\n",
663+
" if not re.findall(fr'#\\| *{k}:', cell.source): cell.source = f'#| {k}: {v}\\n' + cell.source\n",
664664
"\n",
665665
"def clean_show_doc(cell):\n",
666666
" \"Remove ShowDoc input cells\"\n",

nbs/api/14_quarto.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
" path:str=None, # Path to notebooks\n",
216216
" printit:bool=False, # Print YAML for debugging\n",
217217
" force:bool=False, # Create sidebar even if settings.ini custom_sidebar=False\n",
218-
" skip_folder_re:str='(?:^[_.]|^www\\$)', # Skip folders matching regex\n",
218+
" skip_folder_re:str=r'(?:^[_.]|^www\\$)', # Skip folders matching regex\n",
219219
" **kwargs):\n",
220220
" \"Create sidebar.yml\"\n",
221221
" if not force and get_config().custom_sidebar: return\n",

nbs/api/16_migrate.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@
599599
" d += L(get_config().tst_flags).filter()\n",
600600
" d += [s.replace('_', '-') for s in d] # allow for hyphenated version of old directives\n",
601601
" _tmp = '|'.join(list(set(d)))\n",
602-
" return re.compile(f\"^[ \\f\\v\\t]*?(#)\\s*({_tmp})(?!\\S)\", re.MULTILINE)\n",
602+
" return re.compile(fr\"^[ \\f\\v\\t]*?(#)\\s*({_tmp})(?!\\S)\", re.MULTILINE)\n",
603603
"\n",
604604
"def _repl_directives(code_str): \n",
605605
" def _fmt(x): return f\"#| {_subv1(x[2].replace('-', '_').strip())}\"\n",

nbs/api/18_release.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@
685685
" if skip_upload: return print(loc)\n",
686686
" if not upload_user: upload_user = get_config().conda_user\n",
687687
" if not upload_user: return print(\"`conda_user` not in settings.ini and no `upload_user` passed. Cannot upload\")\n",
688-
" if 'anaconda upload' not in res: return print(f\"{res}\\n\\Failed. Check auto-upload not set in .condarc. Try `--do_build False`.\")\n",
688+
" if 'anaconda upload' not in res: return print(f\"{res}\\n\\nFailed. Check auto-upload not set in .condarc. Try `--do_build False`.\")\n",
689689
" return anaconda_upload(name, loc)"
690690
]
691691
},

0 commit comments

Comments
 (0)