We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e04e29 commit 3857f7fCopy full SHA for 3857f7f
mpl_sphinx_theme/__init__.py
@@ -1,12 +1,14 @@
1
from ._version import __version__
2
3
-from os import path
+from pathlib import Path
4
+
5
6
def get_html_theme_path():
7
"""Return list of HTML theme paths."""
- cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
8
- return cur_dir
+ return [str(Path(__file__).parent.parent.resolve())]
9
10
-# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
11
+# See https://www.sphinx-doc.org/en/master/development/theming.html#distribute-your-theme-as-a-python-package
12
def setup(app):
- app.add_html_theme("mpl_sphinx_theme", path.abspath(path.dirname(__file__)))
13
+ app.add_html_theme("mpl_sphinx_theme",
14
+ str(Path(__file__).parent.resolve()))
0 commit comments