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 Dec 21, 2021
1 parent 12f5b1d commit f1cb2f3
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,33 @@
from pathlib import Path

from setuptools_scm import get_version

from sphinx.application import Sphinx
from sphinx.util.docutils import SphinxDirective

from myst_parser import __version__


# -- 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 = "2020, 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 @@ -54,15 +52,15 @@
extensions = [
"myst_parser",
"sphinx.ext.autodoc",
'sphinx.ext.extlinks',
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinxcontrib.bibtex",
"sphinx_panels",
"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 @@ -72,8 +70,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 @@ -121,10 +121,10 @@
"tasklist",
]
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 @@ -142,7 +142,7 @@

# -- 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
# Not yet supported: towncrier_draft_config_path = 'pyproject.toml' # relative to cwd
Expand Down Expand Up @@ -186,11 +186,11 @@ def run_apidoc(app):
# -- Options for extlinks extension ------------------------------------------

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

intersphinx_mapping = {
Expand Down

0 comments on commit f1cb2f3

Please sign in to comment.