Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e79ee48

Browse files
author
David Robertson
authored
disallow-untyped-defs for synapse.server_notices (#11021)
1 parent 7301019 commit e79ee48

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

changelog.d/11021.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add additional type hints to `synapse.server_notices`.

mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ disallow_untyped_defs = True
9999
[mypy-synapse.rest.*]
100100
disallow_untyped_defs = True
101101

102+
[mypy-synapse.server_notices.*]
103+
disallow_untyped_defs = True
104+
102105
[mypy-synapse.state.*]
103106
disallow_untyped_defs = True
104107

synapse/server_notices/server_notices_manager.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,8 @@ def __init__(self, hs: "HomeServer"):
4141
self._notifier = hs.get_notifier()
4242
self.server_notices_mxid = self._config.servernotices.server_notices_mxid
4343

44-
def is_enabled(self):
45-
"""Checks if server notices are enabled on this server.
46-
47-
Returns:
48-
bool
49-
"""
44+
def is_enabled(self) -> bool:
45+
"""Checks if server notices are enabled on this server."""
5046
return self.server_notices_mxid is not None
5147

5248
async def send_notice(

0 commit comments

Comments
 (0)