1
0
mirror of https://github.com/certbot/certbot.git synced 2025-08-06 16:42:41 +03:00

Do not document private members (#7675)

It looks like we're currently documenting functions that are marked private (prefixed with an underscore) such as https://certbot.eff.org/docs/api/certbot.crypto_util.html#certbot.crypto_util._load_cert_or_req. I do not think we should do this because the functionality is private, should not be used, and including it in our docs just adds visual noise.

This PR stops us from documenting private code and fixes up `tools/sphinx-quickstart.sh` so we don't document it in future modules.

* Do not document private code.

* Don't document private members in the future.
This commit is contained in:
Brad Warren
2020-01-10 16:48:01 -08:00
committed by GitHub
parent 456122e342
commit ceea41c1e2
18 changed files with 18 additions and 18 deletions

View File

@@ -41,7 +41,7 @@ extensions = [
] ]
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -39,7 +39,7 @@ extensions = ['sphinx.ext.autodoc',
'jsonlexer'] 'jsonlexer']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode'] 'sphinx.ext.viewcode']
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -52,7 +52,7 @@ if sphinx.version_info >= (1, 6):
extensions.append('sphinx.ext.imgconverter') extensions.append('sphinx.ext.imgconverter')
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -40,7 +40,7 @@ extensions = [
] ]
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members'] autodoc_default_flags = ['show-inheritance']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@@ -14,7 +14,7 @@ sed -i -e "s|\# import os|import os|" conf.py
sed -i -e "s|\# needs_sphinx = '1.0'|needs_sphinx = '1.0'|" conf.py sed -i -e "s|\# needs_sphinx = '1.0'|needs_sphinx = '1.0'|" conf.py
sed -i -e "s|intersphinx_mapping = {'https://docs.python.org/': None}|intersphinx_mapping = {\n 'python': ('https://docs.python.org/', None),\n 'acme': ('https://acme-python.readthedocs.org/en/latest/', None),\n 'certbot': ('https://certbot.eff.org/docs/', None),\n}|" conf.py sed -i -e "s|intersphinx_mapping = {'https://docs.python.org/': None}|intersphinx_mapping = {\n 'python': ('https://docs.python.org/', None),\n 'acme': ('https://acme-python.readthedocs.org/en/latest/', None),\n 'certbot': ('https://certbot.eff.org/docs/', None),\n}|" conf.py
sed -i -e "s|html_theme = 'alabaster'|\n# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs\n# on_rtd is whether we are on readthedocs.org\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\nif not on_rtd: # only import and set the theme if we're building docs locally\n import sphinx_rtd_theme\n html_theme = 'sphinx_rtd_theme'\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n# otherwise, readthedocs.org uses their theme by default, so no need to specify it|" conf.py sed -i -e "s|html_theme = 'alabaster'|\n# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs\n# on_rtd is whether we are on readthedocs.org\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\nif not on_rtd: # only import and set the theme if we're building docs locally\n import sphinx_rtd_theme\n html_theme = 'sphinx_rtd_theme'\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n# otherwise, readthedocs.org uses their theme by default, so no need to specify it|" conf.py
sed -i -e "s|# Add any paths that contain templates here, relative to this directory.|autodoc_member_order = 'bysource'\nautodoc_default_flags = ['show-inheritance', 'private-members']\n\n# Add any paths that contain templates here, relative to this directory.|" conf.py sed -i -e "s|# Add any paths that contain templates here, relative to this directory.|autodoc_member_order = 'bysource'\nautodoc_default_flags = ['show-inheritance']\n\n# Add any paths that contain templates here, relative to this directory.|" conf.py
sed -i -e "s|# The name of the Pygments (syntax highlighting) style to use.|default_role = 'py:obj'\n\n# The name of the Pygments (syntax highlighting) style to use.|" conf.py sed -i -e "s|# The name of the Pygments (syntax highlighting) style to use.|default_role = 'py:obj'\n\n# The name of the Pygments (syntax highlighting) style to use.|" conf.py
echo "/_build/" >> .gitignore echo "/_build/" >> .gitignore
echo "================= echo "=================