chore: reformat sphinx configuration

Format the configuration file to follow our coding guidelines and common
Python style conventions.

Change-Id: Ic83372287db08df0662f562f7683a02ddff0bac8
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
This commit is contained in:
Harrison Mutai 2023-06-05 12:26:28 +01:00
parent 7f126ccff6
commit 29b11baf6b

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2019-2021, Arm Limited. All rights reserved. # Copyright (c) 2019-2023, Arm Limited. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -13,23 +13,23 @@ import os
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'Trusted Firmware-A' project = "Trusted Firmware-A"
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = ['myst_parser', 'sphinx.ext.autosectionlabel', 'sphinxcontrib.plantuml'] extensions = ["myst_parser", "sphinx.ext.autosectionlabel", "sphinxcontrib.plantuml"]
# 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"]
# The suffix(es) of source filenames. # The suffix(es) of source filenames.
source_suffix = ['.md', '.rst'] source_suffix = [".md", ".rst"]
# The master toctree document. # The master toctree document.
master_doc = 'index' master_doc = "index"
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
@ -45,15 +45,15 @@ language = "en"
exclude_patterns = [".env", "env", ".venv", "venv"] exclude_patterns = [".env", "env", ".venv", "venv"]
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' pygments_style = "sphinx"
# Load the contents of the global substitutions file into the 'rst_prolog' # Load the contents of the global substitutions file into the 'rst_prolog'
# variable. This ensures that the substitutions are all inserted into each page. # variable. This ensures that the substitutions are all inserted into each page.
with open('global_substitutions.txt', 'r') as subs: with open("global_substitutions.txt", "r") as subs:
rst_prolog = subs.read() rst_prolog = subs.read()
# Minimum version of sphinx required # Minimum version of sphinx required
needs_sphinx = '2.0' needs_sphinx = "2.0"
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
@ -68,21 +68,21 @@ html_show_copyright = False
html_theme = "sphinx_rtd_theme" html_theme = "sphinx_rtd_theme"
# The logo to display in the sidebar # The logo to display in the sidebar
html_logo = 'resources/TrustedFirmware-Logo_standard-white.png' html_logo = "resources/TrustedFirmware-Logo_standard-white.png"
# Options for the "sphinx-rtd-theme" theme # Options for the "sphinx-rtd-theme" theme
html_theme_options = { html_theme_options = {
'collapse_navigation': False, # Can expand and collapse sidebar entries "collapse_navigation": False, # Can expand and collapse sidebar entries
'prev_next_buttons_location': 'both', # Top and bottom of the page "prev_next_buttons_location": "both", # Top and bottom of the page
'style_external_links': True # Display an icon next to external links "style_external_links": True, # Display an icon next to external links
} }
# Path to _static directory # Path to _static directory
html_static_path = ['_static'] html_static_path = ["_static"]
# Path to css file relative to html_static_path # Path to css file relative to html_static_path
html_css_files = [ html_css_files = [
'css/custom.css', "css/custom.css",
] ]
# -- Options for autosectionlabel -------------------------------------------- # -- Options for autosectionlabel --------------------------------------------
@ -92,4 +92,4 @@ autosectionlabel_maxdepth = 1
# -- Options for plantuml ---------------------------------------------------- # -- Options for plantuml ----------------------------------------------------
plantuml_output_format = 'svg_img' plantuml_output_format = "svg_img"