diff --git a/deluge/core/core.py b/deluge/core/core.py index 1e5774ff16..1a954a5de2 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -401,7 +401,7 @@ def check_new_release(self): @export def add_torrent_file_async( self, filename: str, filedump: str, options: dict, save_state: bool = True - ) -> defer.Deferred[Optional[str]]: + ) -> defer.Deferred: """Adds a torrent file to the session asynchronously. Args: @@ -434,7 +434,7 @@ def add_torrent_file_async( @export def prefetch_magnet_metadata( self, magnet: str, timeout: int = 30 - ) -> defer.Deferred[Tuple[str, bytes]]: + ) -> defer.Deferred: """Download magnet metadata without adding to Deluge session. Used by UIs to get magnet files for selection before adding to session. @@ -490,7 +490,7 @@ def add_torrent_file( @export def add_torrent_files( self, torrent_files: List[Tuple[str, Union[str, bytes], dict]] - ) -> defer.Deferred[List[AddTorrentError]]: + ) -> defer.Deferred: """Adds multiple torrent files to the session asynchronously. Args: @@ -520,7 +520,7 @@ def add_torrents(): @export def add_torrent_url( self, url: str, options: dict, headers: dict = None - ) -> defer.Deferred[Optional[str]]: + ) -> defer.Deferred: """Adds a torrent from a URL. Deluge will attempt to fetch the torrent from the URL prior to adding it to the session. @@ -590,7 +590,7 @@ def remove_torrent(self, torrent_id: str, remove_data: bool) -> bool: @export def remove_torrents( self, torrent_ids: List[str], remove_data: bool - ) -> defer.Deferred[List[Tuple[str, str]]]: + ) -> defer.Deferred: """Remove multiple torrents from the session. Args: @@ -873,11 +873,11 @@ def get_enabled_plugins(self) -> List[str]: return self.pluginmanager.get_enabled_plugins() @export - def enable_plugin(self, plugin: str) -> defer.Deferred[bool]: + def enable_plugin(self, plugin: str) -> defer.Deferred: return self.pluginmanager.enable_plugin(plugin) @export - def disable_plugin(self, plugin: str) -> defer.Deferred[bool]: + def disable_plugin(self, plugin: str) -> defer.Deferred: return self.pluginmanager.disable_plugin(plugin) @export @@ -1211,7 +1211,7 @@ def glob(self, path: str) -> List[str]: return glob.glob(path) @export - def test_listen_port(self) -> defer.Deferred[Optional[bool]]: + def test_listen_port(self) -> defer.Deferred: """Checks if the active port is open Returns: