Source code for desktop_notifier.dummy

# -*- coding: utf-8 -*-
"""
Dummy backend for unsupported platforms.
"""

from __future__ import annotations

# local imports
from .base import Notification, DesktopNotifierBase


[docs] class DummyNotificationCenter(DesktopNotifierBase): """A dummy backend for unsupported platforms""" def __init__( self, app_name: str = "Python", notification_limit: int | None = None, ) -> None: super().__init__(app_name, notification_limit)
[docs] async def request_authorisation(self) -> bool: """ Request authorisation to send notifications. :returns: Whether authorisation has been granted. """ return True
[docs] async def has_authorisation(self) -> bool: """ Whether we have authorisation to send notifications. """ return True
[docs] async def _send( self, notification: Notification, notification_to_replace: Notification | None, ) -> None: pass
[docs] async def _clear(self, notification: Notification) -> None: pass
[docs] async def _clear_all(self) -> None: pass