mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 12:13:52 +01:00
disallow-untyped-defs for synapse.server_notices (#11021)
This commit is contained in:
parent
7301019d48
commit
e79ee48313
3 changed files with 6 additions and 6 deletions
1
changelog.d/11021.misc
Normal file
1
changelog.d/11021.misc
Normal file
|
@ -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 a new issue