From 6d8b49cc090d43c5baf3286840b937b264e5181a Mon Sep 17 00:00:00 2001
From: "i.nueske" <i.nueske@indiscale.com>
Date: Tue, 17 Dec 2024 12:37:55 +0100
Subject: [PATCH] DOC: Update docstrings

---
 src/linkahead/configuration.py         | 16 ++++++++++++++++
 src/linkahead/connection/connection.py |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/linkahead/configuration.py b/src/linkahead/configuration.py
index a87aca4..5081c28 100644
--- a/src/linkahead/configuration.py
+++ b/src/linkahead/configuration.py
@@ -82,6 +82,22 @@ def get_config() -> ConfigParser:
 
 
 def config_to_yaml(config: ConfigParser) -> dict[str, dict[str, Union[int, str, bool, tuple, None]]]:
+    """
+    Generates and returns a dict with all config options and their values
+    defined in the config.
+    The values of the options 'debug', 'timeout', and 'ssl_insecure' are
+    parsed, all other values are saved as string.
+
+    Parameters
+    ----------
+    config : ConfigParser
+        The config to be converted to a dict
+
+    Returns
+    -------
+    valobj : dict
+        A dict with config options and their values as key value pairs
+    """
     valobj: dict[str, dict[str, Union[int, str, bool, tuple, None]]] = {}
     for s in config.sections():
         valobj[s] = {}
diff --git a/src/linkahead/connection/connection.py b/src/linkahead/connection/connection.py
index a9f0756..74dd231 100644
--- a/src/linkahead/connection/connection.py
+++ b/src/linkahead/connection/connection.py
@@ -422,8 +422,10 @@ def configure_connection(**kwargs):
         - "keyring"  Uses the `keyring` library.
         - "auth_token" Uses only a given auth_token.
 
-    timeout : int
+    timeout : int, tuple, or None
         A connection timeout in seconds. (Default: 210)
+        If a tuple is given, they are used as connect and read timeouts
+        respectively, timeout None disables the timeout.
 
     ssl_insecure : bool
         Whether SSL certificate warnings should be ignored. Only use this for
-- 
GitLab