mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 01:39:24 -05:00
disallow-untyped-defs for synapse.server_notices (#11021)
This commit is contained in:
parent
7301019d48
commit
e79ee48313
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 New Issue
Block a user