Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9a36fc2

Browse filesBrowse files
committed
Improve Sphinx conf.py
1 parent 085b876 commit 9a36fc2
Copy full SHA for 9a36fc2

File tree

Expand file treeCollapse file tree

1 file changed

+18
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-15
lines changed

‎conf.py

Copy file name to clipboardExpand all lines: conf.py
+18-15Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,26 @@
3939
html_short_title = f'Documentación {release}'
4040
html_title = f'Documentación de Python en Español -- {release}'
4141

42-
exclude_patterns = [
42+
43+
# Extend settings from upstream
44+
_exclude_patterns = [
4345
# This file is not included and it not marked as :orphan:
44-
'distutils/_setuptools_disclaimer.rst',
45-
'README.rst',
46+
'*/distutils/_setuptools_disclaimer.rst',
47+
]
48+
if 'exclude_patterns' in globals():
49+
exclude_patterns += _exclude_patterns
50+
else:
51+
exclude_patterns = _exclude_patterns
52+
53+
_extensions = [
54+
'sphinx_tabs.tabs',
55+
'sphinxemoji.sphinxemoji',
4656
]
57+
if 'extensions' in globals():
58+
extensions += _extensions
59+
else:
60+
extensions = _extensions
61+
4762

4863
if not os.environ.get('SPHINX_GETTEXT') == 'True':
4964
# Override all the files from ``.overrides`` directory
@@ -69,18 +84,6 @@
6984
_stdauthor, 'manual'),
7085
]
7186

72-
try:
73-
extensions.extend([
74-
'sphinx_tabs.tabs',
75-
'sphinxemoji.sphinxemoji',
76-
])
77-
except NameError:
78-
extensions = [
79-
'sphinx_tabs.tabs',
80-
'sphinxemoji.sphinxemoji',
81-
]
82-
83-
8487
def setup(app):
8588

8689
def add_contributing_banner(app, doctree):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.