Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 19, 2022
1 parent b7d66f7 commit 7c01fc2
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions docs/conf.py
Expand Up @@ -9,32 +9,30 @@
from pathlib import Path

from setuptools_scm import get_version

from sphinx.application import Sphinx


# -- Path setup --------------------------------------------------------------

PROJECT_ROOT_DIR = Path(__file__).parents[1].resolve() # pylint: disable=no-member
get_scm_version = partial(get_version, root=PROJECT_ROOT_DIR)
# -- Project information -----------------------------------------------------

github_url = 'https://github.com'
github_repo_org = 'ansible'
github_repo_name = 'ansible-language-server'
github_repo_slug = f'{github_repo_org}/{github_repo_name}'
github_repo_url = f'{github_url}/{github_repo_slug}'
github_sponsors_url = f'{github_url}/sponsors'
github_url = "https://github.com"
github_repo_org = "ansible"
github_repo_name = "ansible-language-server"
github_repo_slug = f"{github_repo_org}/{github_repo_name}"
github_repo_url = f"{github_url}/{github_repo_slug}"
github_sponsors_url = f"{github_url}/sponsors"

project = "MyST Parser"
copyright = f"{date.today().year}, Executable Book Project"
author = "Executable Book Project"

# The short X.Y version
version = '.'.join(
get_scm_version(
local_scheme='no-local-version',
).split('.')[:3],
version = ".".join(
get_scm_version(local_scheme="no-local-version",).split(
"."
)[:3],
)

# The full version, including alpha/beta/rc tags
Expand All @@ -52,14 +50,14 @@
extensions = [
"myst_parser",
"sphinx.ext.autodoc",
'sphinx.ext.extlinks',
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_design",
"sphinxext.rediraffe",
"sphinxcontrib.mermaid",
"sphinxext.opengraph",
'sphinxcontrib.towncrier', # provides `towncrier-draft-entries` directive
"sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -69,8 +67,10 @@
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
"_build", "Thumbs.db", ".DS_Store",
'changelog-fragments.d/**', # Towncrier-managed change notes
"_build",
"Thumbs.db",
".DS_Store",
"changelog-fragments.d/**", # Towncrier-managed change notes
]


Expand Down Expand Up @@ -123,10 +123,10 @@
]
myst_number_code_blocks = ["typescript"]
myst_substitutions = {
'project': project,
'release': release,
'release_l': f'`{release}`', # Needed in draft changelog for spelling ext
'version': version,
"project": project,
"release": release,
"release_l": f"`{release}`", # Needed in draft changelog for spelling ext
"version": version,
}
myst_heading_anchors = 2
myst_footnote_transition = True
Expand All @@ -151,19 +151,19 @@

# -- Options for towncrier_draft extension -----------------------------------

towncrier_draft_autoversion_mode = 'draft' # or: 'sphinx-version', 'sphinx-release'
towncrier_draft_autoversion_mode = "draft" # or: 'sphinx-version', 'sphinx-release'
towncrier_draft_include_empty = True
towncrier_draft_working_directory = PROJECT_ROOT_DIR
# towncrier_draft_config_path = 'pyproject.toml' # relative to cwd

# -- Options for extlinks extension ------------------------------------------

extlinks = {
'issue': (f'{github_repo_url}/issues/%s', '#%s'), # noqa: WPS323
'pr': (f'{github_repo_url}/pull/%s', 'PR #%s'), # noqa: WPS323
'commit': (f'{github_repo_url}/commit/%s', '%s'), # noqa: WPS323
'gh': (f'{github_url}/%s', 'GitHub: %s'), # noqa: WPS323
'user': (f'{github_sponsors_url}/%s', '@%s'), # noqa: WPS323
"issue": (f"{github_repo_url}/issues/%s", "#%s"), # noqa: WPS323
"pr": (f"{github_repo_url}/pull/%s", "PR #%s"), # noqa: WPS323
"commit": (f"{github_repo_url}/commit/%s", "%s"), # noqa: WPS323
"gh": (f"{github_url}/%s", "GitHub: %s"), # noqa: WPS323
"user": (f"{github_sponsors_url}/%s", "@%s"), # noqa: WPS323
}

intersphinx_mapping = {
Expand Down

0 comments on commit 7c01fc2

Please sign in to comment.