Accepting request 1062691 from devel:languages:python:jupyter
- Modify Example.ipynb because nbval 0.10 abolished saving the input history (forwarded request 1062690 from bnavigator) OBS-URL: https://build.opensuse.org/request/show/1062691 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jupyterlab-pygments?expand=0&rev=8
This commit is contained in:
commit
5a87007923
@ -18,6 +18,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
"mycode = \"\"\"\n",
|
||||||
"class PythonCode:\n",
|
"class PythonCode:\n",
|
||||||
" def __init__(self, value):\n",
|
" def __init__(self, value):\n",
|
||||||
" self.value = value\n",
|
" self.value = value\n",
|
||||||
@ -25,7 +26,9 @@
|
|||||||
" def _repr_html_(self, **kwargs):\n",
|
" def _repr_html_(self, **kwargs):\n",
|
||||||
" formatter = HtmlFormatter(style=JupyterStyle)\n",
|
" formatter = HtmlFormatter(style=JupyterStyle)\n",
|
||||||
" html = highlight(self.value, PythonLexer(), formatter)\n",
|
" html = highlight(self.value, PythonLexer(), formatter)\n",
|
||||||
" return f'<div class=\"highlight\">{html}</div>'"
|
" return f'<div class=\"highlight\">{html}</div>'\n",
|
||||||
|
"\"\"\"\n",
|
||||||
|
"exec(mycode)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -41,7 +44,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"PythonCode(In[2])"
|
"PythonCode(mycode)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 2 17:16:28 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Modify Example.ipynb because nbval 0.10 abolished saving the
|
||||||
|
input history
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Dec 25 11:39:59 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Sun Dec 25 11:39:59 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -33,7 +33,8 @@ License: BSD-3-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/jupyterlab/jupyterlab_pygments
|
URL: https://github.com/jupyterlab/jupyterlab_pygments
|
||||||
Source: https://files.pythonhosted.org/packages/py2.py3/j/jupyterlab-pygments/jupyterlab_pygments-%{version}-py2.py3-none-any.whl
|
Source: https://files.pythonhosted.org/packages/py2.py3/j/jupyterlab-pygments/jupyterlab_pygments-%{version}-py2.py3-none-any.whl
|
||||||
Source1: https://raw.githubusercontent.com/jupyterlab/jupyterlab_pygments/%{version}/notebooks/Example.ipynb
|
# Slightly modified from https://github.com/jupyterlab/jupyterlab_pygments/blob/0.2.2/notebooks/Example.ipynb
|
||||||
|
Source1: Example.ipynb
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user