Coverage for seedboxsync/core/ping/abstract_ping_client.py: 100%

1 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-07-26 17:46 +0000

1# 

2# Copyright (C) 2015-2026 Guillaume Kulakowski <guillaume@kulakowski.fr> 

3# 

4# For the full copyright and license information, please view the LICENSE 

5# file that was distributed with this source code. 

6# 

7""" 

8Abstract transport client using paramiko-like interface. 

9 

10This class defines the interface that all transport clients must implement, 

11providing methods for file operations and session management on a remote server. 

12""" 

13 

14from abc import ABCMeta, abstractmethod 

15 

16 

17class AbstractPingClient: # pragma: no cover 

18 """ 

19 Abstract base class for transport clients. 

20 

21 All concrete clients must implement methods to manage file transfers 

22 and remote file operations. 

23 """ 

24 

25 __metaclass__ = ABCMeta 

26 

27 @abstractmethod 

28 def __init__(self) -> None: 

29 """Init method.""" 

30 

31 @abstractmethod 

32 def start(self, sub_command: str) -> None: 

33 """ 

34 Send a start ping for a given subcommand. 

35 

36 Args: 

37 sub_command (str): The SeedboxSync subcommand to ping. 

38 """ 

39 

40 @abstractmethod 

41 def success(self, sub_command: str) -> None: 

42 """ 

43 Send a success ping for a given subcommand. 

44 

45 Args: 

46 sub_command (str): The SeedboxSync subcommand to ping. 

47 """