From 5311b3498df2dbdb60a63e0805e243b0b8c7deaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Jer=C5=A1e?= Date: Wed, 19 Jun 2024 11:36:30 +0200 Subject: [PATCH] Run linters on conf.py --- docs/conf.py | 62 +++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 41d8da24e..db2b1e0d7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,15 +11,15 @@ # 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, ) @@ -27,32 +27,32 @@ # 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 @@ -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 @@ -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", ""), }