summary refs log tree commit diff
path: root/synapse/app/__init__.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-11-10 15:06:54 -0500
committerGitHub <noreply@github.com>2021-11-10 15:06:54 -0500
commit5cace20bf1f3c50ea50d56a938c4eee5825f4b84 (patch)
treeeb926831cf00aabe5c43a32dfae9256d83e4fb07 /synapse/app/__init__.py
parentAdd type hints to synapse._scripts (#11297) (diff)
downloadsynapse-5cace20bf1f3c50ea50d56a938c4eee5825f4b84.tar.xz
Add missing type hints to `synapse.app`. (#11287)
Diffstat (limited to 'synapse/app/__init__.py')
-rw-r--r--synapse/app/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/app/__init__.py b/synapse/app/__init__.py
index f9940491e8..ee51480a9e 100644
--- a/synapse/app/__init__.py
+++ b/synapse/app/__init__.py
@@ -13,6 +13,7 @@
 # limitations under the License.
 import logging
 import sys
+from typing import Container
 
 from synapse import python_dependencies  # noqa: E402
 
@@ -27,7 +28,9 @@ except python_dependencies.DependencyException as e:
     sys.exit(1)
 
 
-def check_bind_error(e, address, bind_addresses):
+def check_bind_error(
+    e: Exception, address: str, bind_addresses: Container[str]
+) -> None:
     """
     This method checks an exception occurred while binding on 0.0.0.0.
     If :: is specified in the bind addresses a warning is shown.
@@ -38,9 +41,9 @@ def check_bind_error(e, address, bind_addresses):
     When binding on 0.0.0.0 after :: this can safely be ignored.
 
     Args:
-        e (Exception): Exception that was caught.
-        address (str): Address on which binding was attempted.
-        bind_addresses (list): Addresses on which the service listens.
+        e: Exception that was caught.
+        address: Address on which binding was attempted.
+        bind_addresses: Addresses on which the service listens.
     """
     if address == "0.0.0.0" and "::" in bind_addresses:
         logger.warning(