summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/11021.misc1
-rw-r--r--mypy.ini3
-rw-r--r--synapse/server_notices/server_notices_manager.py8
3 files changed, 6 insertions, 6 deletions
diff --git a/changelog.d/11021.misc b/changelog.d/11021.misc
new file mode 100644
index 0000000000..8ac1bfcf22
--- /dev/null
+++ b/changelog.d/11021.misc
@@ -0,0 +1 @@
+Add additional type hints to `synapse.server_notices`.
\ No newline at end of file
diff --git a/mypy.ini b/mypy.ini
index a052d49c71..68437e5ce1 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -99,6 +99,9 @@ disallow_untyped_defs = True
 [mypy-synapse.rest.*]
 disallow_untyped_defs = True
 
+[mypy-synapse.server_notices.*]
+disallow_untyped_defs = True
+
 [mypy-synapse.state.*]
 disallow_untyped_defs = True
 
diff --git a/synapse/server_notices/server_notices_manager.py b/synapse/server_notices/server_notices_manager.py
index cd1c5ff6f4..0cf60236f8 100644
--- a/synapse/server_notices/server_notices_manager.py
+++ b/synapse/server_notices/server_notices_manager.py
@@ -41,12 +41,8 @@ class ServerNoticesManager:
         self._notifier = hs.get_notifier()
         self.server_notices_mxid = self._config.servernotices.server_notices_mxid
 
-    def is_enabled(self):
-        """Checks if server notices are enabled on this server.
-
-        Returns:
-            bool
-        """
+    def is_enabled(self) -> bool:
+        """Checks if server notices are enabled on this server."""
         return self.server_notices_mxid is not None
 
     async def send_notice(