From 56f88757c722d479fc8978f8a8be8469124970e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Tue, 4 May 2021 16:18:21 +0300 Subject: [PATCH] Allow missing env var. Closes #14. --- tests/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/conf.py b/tests/conf.py index 50baef3..2b251bb 100644 --- a/tests/conf.py +++ b/tests/conf.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import os +import sphinx_py3doc_enhanced_theme extensions = [ 'sphinx.ext.autodoc', @@ -24,13 +25,13 @@ year = '2014-2015' author = 'Ionel Cristian Mărieș' copyright = '{0}, {1}'.format(year, author) version = release = '2.4.0' -import sphinx_py3doc_enhanced_theme + html_theme = "sphinx_py3doc_enhanced_theme" html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()] html_theme_options = { 'githuburl': 'https://github.com/ionelmc/sphinx-py3doc-enhanced-theme/', } -if os.environ['EXTRASTYLING'] == 'false': +if os.environ.get('EXTRASTYLING', 'false') == 'false': html_theme_options.update({ 'bodyfont': '"Lucida Grande",Arial,sans-serif', 'headfont': '"Lucida Grande",Arial,sans-serif', @@ -47,6 +48,6 @@ html_use_smartypants = True html_last_updated_fmt = '%b %d, %Y' html_split_index = True html_sidebars = { - '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'], + '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'], } html_short_title = '%s-%s' % (project, version) -- 2.26.3