Skip to content

Commit 8cd1b17

Browse files
author
Solveit
committed
solveit commit: Feb. 27 11:02:24 UTC
1 parent 25e50cf commit 8cd1b17

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

nbs/api/01_config.ipynb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -626,15 +626,21 @@
626626
{
627627
"data": {
628628
"text/markdown": [
629+
"<div class=\"prose\">\n",
630+
"\n",
629631
"```python\n",
630632
"print(create_output('text', 'text/plain'))\n",
631-
"```"
633+
"```\n",
634+
"\n",
635+
"</div>"
632636
],
633637
"text/plain": [
634-
"<IPython.core.display.Markdown object>"
638+
"Markdown(```python\n",
639+
"print(create_output('text', 'text/plain'))\n",
640+
"```)"
635641
]
636642
},
637-
"execution_count": null,
643+
"execution_count": 34,
638644
"metadata": {},
639645
"output_type": "execute_result"
640646
}
@@ -683,7 +689,7 @@
683689
"source": [
684690
"#| export\n",
685691
"_re_version = re.compile(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]+)[\\'\"]', re.MULTILINE)\n",
686-
"_re_proj = re.compile(r'^name\\s*=\\s*\".*$', re.MULTILINE)\n",
692+
"_re_proj = re.compile(r'(\\[project\\](?:\\n(?!\\[).*)*?\\n)name\\s*=\\s*\"[^\"]*\"')\n",
687693
"_re_reqpy = re.compile(r'^requires-python\\s*=\\s*\".*$', re.MULTILINE)\n",
688694
"_init = '__init__.py'\n",
689695
"_pyproj = 'pyproject.toml'"
@@ -800,7 +806,7 @@
800806
" fname = path/_pyproj\n",
801807
" if not fname.exists(): fname.write_text(pyproj_tmpl)\n",
802808
" txt = fname.read_text()\n",
803-
" txt = _re_proj.sub(f'name = \"{get_config().lib_name}\"', txt)\n",
809+
" txt = _re_proj.sub(rf'\\1name = \"{get_config().lib_name}\"', txt)\n",
804810
" txt = _re_reqpy.sub(f'requires-python = \">={get_config().min_python}\"', txt)\n",
805811
" fname.write_text(txt)"
806812
]
@@ -941,7 +947,10 @@
941947
]
942948
}
943949
],
944-
"metadata": {},
950+
"metadata": {
951+
"solveit_dialog_mode": "learning",
952+
"solveit_ver": 2
953+
},
945954
"nbformat": 4,
946955
"nbformat_minor": 5
947956
}

0 commit comments

Comments
 (0)