prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add Google Style Docstrings
  We should implement Google Style Docstrings to every function, method, class in opsdroid. This style will support existing documentation and will help in the future by generating documentation automatically.
  
  This consists in a bit of effort so this issue can be worked by more than one contributor, just make sure that everyone knows what you are working on in order to avoid other contributors spending time on something that you are working on.
  
  If you are unfamiliar with the Google Style Docstrings I'd recommend that you check these resources:
  
   - [Sphix 1.8.0+ - Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
  
  
  
  Docstrings that need to be updated:
  
  - main.py
    - [x] configure_lang
    - [ ] configure_log
    - [ ] get_logging_level
    - [ ] check_dependencies
    - [ ] print_version
    - [ ] print_example_config
    - [ ] edit_files
    - [x] welcome_message
  - ~~helper.py~~
    - [x] get_opsdroid
    - [x] del_rw
    - [x] move_config_to_appdir
  - memory.py
    - [x] Memory
    - [x] get
    - [x] put
    - [x] _get_from_database
    - [x] _put_to_database
  - message.py
    - [x] Message
    - [x]  __init__
    - [x]  _thinking_delay
    - [x]  _typing delay
    - [x]  respond
    - [x]  react
  - web.py
    - [ ] Web
    - [x] get_port
    - [x] get_host
    - [x]  get_ssl_context
    - [ ]  start
    - [ ]  build_response
    - [ ]  web_index_handler
    - [ ]  web_stats_handler
  - matchers.py
    - [ ] match_regex
    - [ ] match_apiai_action
    - [ ] match_apiai_intent
    - [ ]  match_dialogflow_action
    - [ ]  match_dialogflow_intent
    - [ ] match_luisai_intent
    - [ ] match_rasanlu
    - [ ] match_recastai
    - [ ] match_witai
    - [ ] match_crontab
    - [ ] match_webhook
    - [ ] match_always
  - core.py
    - [ ] OpsDroid
    - [ ] default_connector
    - [ ] exit
    - [ ] critical
    - [ ]  call_stop
    - [ ] disconnect
    - [ ] stop
    - [ ] load
    - [ ] start_loop
    - [x] setup_skills
    - [ ] train_parsers
    - [ ] start_connector_tasks
    - [ ] start_database
    - [ ] run_skill
    - [ ] get_ranked_skills
    - [ ] parse
  - loader.py
    - [ ] Loader
    - [x] import_module_from_spec
    - [x] import_module
    - [x] check_cache
    - [x] build_module_import_path
    - [x] build_module_install_path
    - [x] git_clone
    - [x] git_pull
    - [x] pip_install_deps
    - [x] create_default_config
    - [x] load_config_file
    - [ ] envvar_constructor
    - [ ] include_constructor
    - [x] setup_modules_directory
    - [x] load_modules_from_config
    - [x] _load_modules
    - [x] _install_module
    - [x] _update_module
    - [ ] _install_git_module
    - [x] _install_local_module
  
  
  
  
  
  
  
  
  
  ---- ORIGINAL POST ---- 
  I've been wondering about this for a while now and I would like to know if we should replace/update all the docstrings in opsdroid with the Google Style doc strings. 
  
  I think this could help new and old contributors to contribute and commit to opsdroid since the Google Style docstrings give more information about every method/function and specifies clearly what sort of input the function/method expects, what will it return and what will be raised (if applicable).
  
  The downsize of this style is that the length of every .py file will increase due to the doc strings, but since most IDE's allow you to hide those fields it shouldn't be too bad.
  
  Here is a good example of Google Style Doc strings:  [Sphix 1.8.0+ - Google Style Docstrings](http://www.sphinx-doc.org/en/master/ext/example_google.html)
  
  I would like to know what you all think about this idea and if its worth spending time on it.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `opsdroid/memory.py`
  Content:
  ```
  1 """Class for persisting information in opsdroid."""
  2 
  3 import logging
  4 
  5 
  6 _LOGGER = logging.getLogger(__name__)
  7 
  8 
  9 class Memory:
  10     """An object to store and persist data outside of opsdroid."""
  11 
  12     def __init__(self):
  13         """Create memory dictionary."""
  14         self.memory = {}
  15         self.databases = []
  16 
  17     async def get(self, key):
  18         """Get data object for a given key."""
  19         _LOGGER.debug(_("Getting %s from memory."), key)
  20         database_result = await self._get_from_database(key)
  21         if database_result is not None:
  22             self.memory[key] = database_result
  23         if key in self.memory:
  24             return self.memory[key]
  25 
  26         return None
  27 
  28     async def put(self, key, data):
  29         """Put a data object to a given key."""
  30         _LOGGER.debug(_("Putting %s to memory"), key)
  31         self.memory[key] = data
  32         await self._put_to_database(key, self.memory[key])
  33 
  34     async def _get_from_database(self, key):
  35         """Get updates from databases for a given key."""
  36         if not self.databases:
  37             return None
  38 
  39         results = []
  40         for database in self.databases:
  41             results.append(await database.get(key))
  42         # TODO: Handle multiple databases
  43         return results[0]
  44 
  45     async def _put_to_database(self, key, data):
  46         """Put updates into databases for a given key."""
  47         if self.databases:
  48             for database in self.databases:
  49                 await database.put(key, data)
  50
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/opsdroid/memory.py b/opsdroid/memory.py
  --- a/opsdroid/memory.py
  +++ b/opsdroid/memory.py
  @@ -7,15 +7,33 @@
   
   
   class Memory:
  -    """An object to store and persist data outside of opsdroid."""
  +    """A Memory object.
  +
  +    An object to obtain, store and persist data outside of opsdroid.
  +
  +    Attributes:
  +        databases (:obj:`list` of :obj:`Database`): List of database objects.
  +        memory (:obj:`dict`): In-memory dictionary to store data.
  +
  +    """
   
       def __init__(self):
  -        """Create memory dictionary."""
  +        """Create object with minimum properties."""
           self.memory = {}
           self.databases = []
   
       async def get(self, key):
  -        """Get data object for a given key."""
  +        """Get data object for a given key.
  +
  +        Gets the key value found in-memory or from the database(s).
  +
  +        Args:
  +            key (str): Key to retrieve data.
  +
  +        Returns:
  +            A data object for the given key, otherwise `None`.
  +
  +        """
           _LOGGER.debug(_("Getting %s from memory."), key)
           database_result = await self._get_from_database(key)
           if database_result is not None:
  @@ -26,24 +44,53 @@
           return None
   
       async def put(self, key, data):
  -        """Put a data object to a given key."""
  +        """Put a data object to a given key.
  +
  +        Stores the key and value in memory and the database(s).
  +
  +        Args:
  +            key (str): Key for the data to store.
  +            data (obj): Data object to store.
  +
  +        """
           _LOGGER.debug(_("Putting %s to memory"), key)
           self.memory[key] = data
           await self._put_to_database(key, self.memory[key])
   
       async def _get_from_database(self, key):
  -        """Get updates from databases for a given key."""
  +        """Get updates from databases for a given key.
  +
  +        Gets the first key value found from the database(s).
  +
  +        Args:
  +            key (str): Key to retrieve data from a database.
  +
  +        Returns:
  +            The first key value (data object) found from the database(s).
  +            Or `None` when no database is defined or no value is found.
  +
  +        Todo:
  +            * Handle multiple databases
  +
  +        """
           if not self.databases:
               return None
   
           results = []
           for database in self.databases:
               results.append(await database.get(key))
  -        # TODO: Handle multiple databases
           return results[0]
   
       async def _put_to_database(self, key, data):
  -        """Put updates into databases for a given key."""
  +        """Put updates into databases for a given key.
  +
  +        Stores the key and value on each database defined.
  +
  +        Args:
  +            key (str): Key for the data to store.
  +            data (obj): Data object to store.
  +
  +        """
           if self.databases:
               for database in self.databases:
                   await database.put(key, data)
  
verification_info: {"golden_diff": "diff --git a/opsdroid/memory.py b/opsdroid/memory.py\n--- a/opsdroid/memory.py\n+++ b/opsdroid/memory.py\n@@ -7,15 +7,33 @@\n \n \n class Memory:\n-    \"\"\"An object to store and persist data outside of opsdroid.\"\"\"\n+    \"\"\"A Memory object.\n+\n+    An object to obtain, store and persist data outside of opsdroid.\n+\n+    Attributes:\n+        databases (:obj:`list` of :obj:`Database`): List of database objects.\n+        memory (:obj:`dict`): In-memory dictionary to store data.\n+\n+    \"\"\"\n \n     def __init__(self):\n-        \"\"\"Create memory dictionary.\"\"\"\n+        \"\"\"Create object with minimum properties.\"\"\"\n         self.memory = {}\n         self.databases = []\n \n     async def get(self, key):\n-        \"\"\"Get data object for a given key.\"\"\"\n+        \"\"\"Get data object for a given key.\n+\n+        Gets the key value found in-memory or from the database(s).\n+\n+        Args:\n+            key (str): Key to retrieve data.\n+\n+        Returns:\n+            A data object for the given key, otherwise `None`.\n+\n+        \"\"\"\n         _LOGGER.debug(_(\"Getting %s from memory.\"), key)\n         database_result = await self._get_from_database(key)\n         if database_result is not None:\n@@ -26,24 +44,53 @@\n         return None\n \n     async def put(self, key, data):\n-        \"\"\"Put a data object to a given key.\"\"\"\n+        \"\"\"Put a data object to a given key.\n+\n+        Stores the key and value in memory and the database(s).\n+\n+        Args:\n+            key (str): Key for the data to store.\n+            data (obj): Data object to store.\n+\n+        \"\"\"\n         _LOGGER.debug(_(\"Putting %s to memory\"), key)\n         self.memory[key] = data\n         await self._put_to_database(key, self.memory[key])\n \n     async def _get_from_database(self, key):\n-        \"\"\"Get updates from databases for a given key.\"\"\"\n+        \"\"\"Get updates from databases for a given key.\n+\n+        Gets the first key value found from the database(s).\n+\n+        Args:\n+            key (str): Key to retrieve data from a database.\n+\n+        Returns:\n+            The first key value (data object) found from the database(s).\n+            Or `None` when no database is defined or no value is found.\n+\n+        Todo:\n+            * Handle multiple databases\n+\n+        \"\"\"\n         if not self.databases:\n             return None\n \n         results = []\n         for database in self.databases:\n             results.append(await database.get(key))\n-        # TODO: Handle multiple databases\n         return results[0]\n \n     async def _put_to_database(self, key, data):\n-        \"\"\"Put updates into databases for a given key.\"\"\"\n+        \"\"\"Put updates into databases for a given key.\n+\n+        Stores the key and value on each database defined.\n+\n+        Args:\n+            key (str): Key for the data to store.\n+            data (obj): Data object to store.\n+\n+        \"\"\"\n         if self.databases:\n             for database in self.databases:\n                 await database.put(key, data)\n", "issue": "Add Google Style Docstrings\nWe should implement Google Style Docstrings to every function, method, class in opsdroid. This style will support existing documentation and will help in the future by generating documentation automatically.\r\n\r\nThis consists in a bit of effort so this issue can be worked by more than one contributor, just make sure that everyone knows what you are working on in order to avoid other contributors spending time on something that you are working on.\r\n\r\nIf you are unfamiliar with the Google Style Docstrings I'd recommend that you check these resources:\r\n\r\n - [Sphix 1.8.0+ - Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)\r\n\r\n\r\n\r\nDocstrings that need to be updated:\r\n\r\n- main.py\r\n  - [x] configure_lang\r\n  - [ ] configure_log\r\n  - [ ] get_logging_level\r\n  - [ ] check_dependencies\r\n  - [ ] print_version\r\n  - [ ] print_example_config\r\n  - [ ] edit_files\r\n  - [x] welcome_message\r\n- ~~helper.py~~\r\n  - [x] get_opsdroid\r\n  - [x] del_rw\r\n  - [x] move_config_to_appdir\r\n- memory.py\r\n  - [x] Memory\r\n  - [x] get\r\n  - [x] put\r\n  - [x] _get_from_database\r\n  - [x] _put_to_database\r\n- message.py\r\n  - [x] Message\r\n  - [x]  __init__\r\n  - [x]  _thinking_delay\r\n  - [x]  _typing delay\r\n  - [x]  respond\r\n  - [x]  react\r\n- web.py\r\n  - [ ] Web\r\n  - [x] get_port\r\n  - [x] get_host\r\n  - [x]  get_ssl_context\r\n  - [ ]  start\r\n  - [ ]  build_response\r\n  - [ ]  web_index_handler\r\n  - [ ]  web_stats_handler\r\n- matchers.py\r\n  - [ ] match_regex\r\n  - [ ] match_apiai_action\r\n  - [ ] match_apiai_intent\r\n  - [ ]  match_dialogflow_action\r\n  - [ ]  match_dialogflow_intent\r\n  - [ ] match_luisai_intent\r\n  - [ ] match_rasanlu\r\n  - [ ] match_recastai\r\n  - [ ] match_witai\r\n  - [ ] match_crontab\r\n  - [ ] match_webhook\r\n  - [ ] match_always\r\n- core.py\r\n  - [ ] OpsDroid\r\n  - [ ] default_connector\r\n  - [ ] exit\r\n  - [ ] critical\r\n  - [ ]  call_stop\r\n  - [ ] disconnect\r\n  - [ ] stop\r\n  - [ ] load\r\n  - [ ] start_loop\r\n  - [x] setup_skills\r\n  - [ ] train_parsers\r\n  - [ ] start_connector_tasks\r\n  - [ ] start_database\r\n  - [ ] run_skill\r\n  - [ ] get_ranked_skills\r\n  - [ ] parse\r\n- loader.py\r\n  - [ ] Loader\r\n  - [x] import_module_from_spec\r\n  - [x] import_module\r\n  - [x] check_cache\r\n  - [x] build_module_import_path\r\n  - [x] build_module_install_path\r\n  - [x] git_clone\r\n  - [x] git_pull\r\n  - [x] pip_install_deps\r\n  - [x] create_default_config\r\n  - [x] load_config_file\r\n  - [ ] envvar_constructor\r\n  - [ ] include_constructor\r\n  - [x] setup_modules_directory\r\n  - [x] load_modules_from_config\r\n  - [x] _load_modules\r\n  - [x] _install_module\r\n  - [x] _update_module\r\n  - [ ] _install_git_module\r\n  - [x] _install_local_module\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---- ORIGINAL POST ---- \r\nI've been wondering about this for a while now and I would like to know if we should replace/update all the docstrings in opsdroid with the Google Style doc strings. \r\n\r\nI think this could help new and old contributors to contribute and commit to opsdroid since the Google Style docstrings give more information about every method/function and specifies clearly what sort of input the function/method expects, what will it return and what will be raised (if applicable).\r\n\r\nThe downsize of this style is that the length of every .py file will increase due to the doc strings, but since most IDE's allow you to hide those fields it shouldn't be too bad.\r\n\r\nHere is a good example of Google Style Doc strings:  [Sphix 1.8.0+ - Google Style Docstrings](http://www.sphinx-doc.org/en/master/ext/example_google.html)\r\n\r\nI would like to know what you all think about this idea and if its worth spending time on it.\n", "before_files": [{"content": "\"\"\"Class for persisting information in opsdroid.\"\"\"\n\nimport logging\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass Memory:\n    \"\"\"An object to store and persist data outside of opsdroid.\"\"\"\n\n    def __init__(self):\n        \"\"\"Create memory dictionary.\"\"\"\n        self.memory = {}\n        self.databases = []\n\n    async def get(self, key):\n        \"\"\"Get data object for a given key.\"\"\"\n        _LOGGER.debug(_(\"Getting %s from memory.\"), key)\n        database_result = await self._get_from_database(key)\n        if database_result is not None:\n            self.memory[key] = database_result\n        if key in self.memory:\n            return self.memory[key]\n\n        return None\n\n    async def put(self, key, data):\n        \"\"\"Put a data object to a given key.\"\"\"\n        _LOGGER.debug(_(\"Putting %s to memory\"), key)\n        self.memory[key] = data\n        await self._put_to_database(key, self.memory[key])\n\n    async def _get_from_database(self, key):\n        \"\"\"Get updates from databases for a given key.\"\"\"\n        if not self.databases:\n            return None\n\n        results = []\n        for database in self.databases:\n            results.append(await database.get(key))\n        # TODO: Handle multiple databases\n        return results[0]\n\n    async def _put_to_database(self, key, data):\n        \"\"\"Put updates into databases for a given key.\"\"\"\n        if self.databases:\n            for database in self.databases:\n                await database.put(key, data)\n", "path": "opsdroid/memory.py"}], "after_files": [{"content": "\"\"\"Class for persisting information in opsdroid.\"\"\"\n\nimport logging\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass Memory:\n    \"\"\"A Memory object.\n\n    An object to obtain, store and persist data outside of opsdroid.\n\n    Attributes:\n        databases (:obj:`list` of :obj:`Database`): List of database objects.\n        memory (:obj:`dict`): In-memory dictionary to store data.\n\n    \"\"\"\n\n    def __init__(self):\n        \"\"\"Create object with minimum properties.\"\"\"\n        self.memory = {}\n        self.databases = []\n\n    async def get(self, key):\n        \"\"\"Get data object for a given key.\n\n        Gets the key value found in-memory or from the database(s).\n\n        Args:\n            key (str): Key to retrieve data.\n\n        Returns:\n            A data object for the given key, otherwise `None`.\n\n        \"\"\"\n        _LOGGER.debug(_(\"Getting %s from memory.\"), key)\n        database_result = await self._get_from_database(key)\n        if database_result is not None:\n            self.memory[key] = database_result\n        if key in self.memory:\n            return self.memory[key]\n\n        return None\n\n    async def put(self, key, data):\n        \"\"\"Put a data object to a given key.\n\n        Stores the key and value in memory and the database(s).\n\n        Args:\n            key (str): Key for the data to store.\n            data (obj): Data object to store.\n\n        \"\"\"\n        _LOGGER.debug(_(\"Putting %s to memory\"), key)\n        self.memory[key] = data\n        await self._put_to_database(key, self.memory[key])\n\n    async def _get_from_database(self, key):\n        \"\"\"Get updates from databases for a given key.\n\n        Gets the first key value found from the database(s).\n\n        Args:\n            key (str): Key to retrieve data from a database.\n\n        Returns:\n            The first key value (data object) found from the database(s).\n            Or `None` when no database is defined or no value is found.\n\n        Todo:\n            * Handle multiple databases\n\n        \"\"\"\n        if not self.databases:\n            return None\n\n        results = []\n        for database in self.databases:\n            results.append(await database.get(key))\n        return results[0]\n\n    async def _put_to_database(self, key, data):\n        \"\"\"Put updates into databases for a given key.\n\n        Stores the key and value on each database defined.\n\n        Args:\n            key (str): Key for the data to store.\n            data (obj): Data object to store.\n\n        \"\"\"\n        if self.databases:\n            for database in self.databases:\n                await database.put(key, data)\n", "path": "opsdroid/memory.py"}]}