From 703769a0a6523f326ec8364a37288ab4196fca7b Mon Sep 17 00:00:00 2001 From: Georg Krause <mail@georg-krause.net> Date: Sat, 2 Apr 2022 10:44:38 +0200 Subject: [PATCH] Omit module names in API docs, fix formatting --- docs/conf.py | 16 +++++++++++----- requests_http_message_signatures/__init__.py | 4 +--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b5ba5a8..bf1928b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,8 +30,12 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", - "sphinx.ext.githubpages", "myst_parser"] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", + "sphinx.ext.githubpages", + "myst_parser", +] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -41,9 +45,9 @@ templates_path = ["_templates"] # # source_suffix = ['.rst', '.md'] source_suffix = { - '.rst': 'restructuredtext', - '.txt': 'markdown', - '.md': 'markdown', + ".rst": "restructuredtext", + ".txt": "markdown", + ".md": "markdown", } # The master toctree document. @@ -169,3 +173,5 @@ texinfo_documents = [ "Miscellaneous", ), ] + +add_module_names = False diff --git a/requests_http_message_signatures/__init__.py b/requests_http_message_signatures/__init__.py index 8e1f5b9..434302b 100644 --- a/requests_http_message_signatures/__init__.py +++ b/requests_http_message_signatures/__init__.py @@ -111,9 +111,7 @@ class HTTPSignatureAuth(requests.auth.AuthBase): request.headers["Digest"] = "SHA-256=" + base64.b64encode(digest).decode() @classmethod - def get_string_to_sign( - cls, request, headers, created_timestamp, expires_timestamp - ): + def get_string_to_sign(cls, request, headers, created_timestamp, expires_timestamp): sts = [] for header in headers: if header == "(request-target)": -- GitLab