Skip to content

Commit

Permalink
Run linters on conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Jun 19, 2024
1 parent 7d56a44 commit 8cc08f3
Showing 1 changed file with 32 additions and 30 deletions.
62 changes: 32 additions & 30 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,48 @@
# using Tox, it can't use the 'test.settings' Django settings module.
settings.configure(
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
'rest_framework',
'versionfield',
'resolwe',
'resolwe.permissions',
'resolwe.flow',
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.staticfiles",
"rest_framework",
"versionfield",
"resolwe",
"resolwe.permissions",
"resolwe.flow",
),
DEBUG=True,
)
django.setup()

# Get package metadata from 'resolwe/__about__.py' file
about = {}
with open(os.path.join(base_dir, 'resolwe', '__about__.py')) as f:
with open(os.path.join(base_dir, "resolwe", "__about__.py")) as f:
exec(f.read(), about)

# -- General configuration ------------------------------------------------

# The extension modules to enable.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
]

# The suffix(es) of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'Resolwe'
version = metadata.metadata('resolwe')['version']
project = "Resolwe"
version = metadata.metadata("resolwe")["version"]
release = version
author = metadata.metadata('resolwe')['Author-email']
author = metadata.metadata("resolwe")["Author-email"]
copyright = "2015-2024, " + author

# The language for content autogenerated by Sphinx. Refer to documentation
Expand All @@ -64,10 +64,10 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -78,26 +78,28 @@
nitpick_ignore = [
# This is needed to prevent warnings for container types, e.g.:
# :type foo: tuple(bool, str)
('py:obj', ''),
("py:obj", ""),
]

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# Output file base name for HTML help builder.
htmlhelp_basename = 'Resolwedoc'
htmlhelp_basename = "Resolwedoc"

# Configuration for intersphinx
_django_major_version = "{}.{}".format(*django.VERSION[:2])
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'django': ('https://docs.djangoproject.com/en/{}/'.format(_django_major_version),
'https://docs.djangoproject.com/en/{}/_objects/'.format(_django_major_version)),
"python": ("https://docs.python.org/3", None),
"django": (
"https://docs.djangoproject.com/en/{}/".format(_django_major_version),
"https://docs.djangoproject.com/en/{}/_objects/".format(_django_major_version),
),
}

# Configuration for extlinks
extlinks = {
'drf': ('http://www.django-rest-framework.org/api-guide/%s', ''),
"drf": ("http://www.django-rest-framework.org/api-guide/%s", ""),
}

0 comments on commit 8cc08f3

Please sign in to comment.