mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 02:14:11 -04:00
Add a type hints for service notices to the HomeServer object. (#9675)
This commit is contained in:
parent
e550ab17ad
commit
7e8dc9934e
11 changed files with 52 additions and 40 deletions
|
@ -12,25 +12,27 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
from typing import Iterable, Union
|
||||
from typing import TYPE_CHECKING, Iterable, Union
|
||||
|
||||
from synapse.server_notices.consent_server_notices import ConsentServerNotices
|
||||
from synapse.server_notices.resource_limits_server_notices import (
|
||||
ResourceLimitsServerNotices,
|
||||
)
|
||||
from synapse.server_notices.worker_server_notices_sender import (
|
||||
WorkerServerNoticesSender,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from synapse.server import HomeServer
|
||||
|
||||
|
||||
class ServerNoticesSender:
|
||||
class ServerNoticesSender(WorkerServerNoticesSender):
|
||||
"""A centralised place which sends server notices automatically when
|
||||
Certain Events take place
|
||||
"""
|
||||
|
||||
def __init__(self, hs):
|
||||
"""
|
||||
|
||||
Args:
|
||||
hs (synapse.server.HomeServer):
|
||||
"""
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
super().__init__(hs)
|
||||
self._server_notices = (
|
||||
ConsentServerNotices(hs),
|
||||
ResourceLimitsServerNotices(hs),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue