disallow-untyped-defs for synapse.server_notices (#11021)
This commit is contained in:
parent
7301019d48
commit
e79ee48313
|
@ -0,0 +1 @@
|
|||
Add additional type hints to `synapse.server_notices`.
|
3
mypy.ini
3
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
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue