11
11
# limitations under the License.
12
12
13
13
import functools
14
+ from typing import Any
14
15
15
16
from testinfra .modules .base import Module
16
17
@@ -34,22 +35,22 @@ def __init__(self, name):
34
35
super ().__init__ ()
35
36
36
37
@property
37
- def exists (self ):
38
+ def exists (self ) -> bool :
38
39
"""Test if the service exists"""
39
40
raise NotImplementedError
40
41
41
42
@property
42
- def is_running (self ):
43
+ def is_running (self ) -> bool :
43
44
"""Test if service is running"""
44
45
raise NotImplementedError
45
46
46
47
@property
47
- def is_enabled (self ):
48
+ def is_enabled (self ) -> bool :
48
49
"""Test if service is enabled"""
49
50
raise NotImplementedError
50
51
51
52
@property
52
- def is_valid (self ):
53
+ def is_valid (self ) -> bool :
53
54
"""Test if service is valid
54
55
55
56
This method is only available in the systemd implementation,
@@ -58,7 +59,7 @@ def is_valid(self):
58
59
raise NotImplementedError
59
60
60
61
@property
61
- def is_masked (self ):
62
+ def is_masked (self ) -> bool :
62
63
"""Test if service is masked
63
64
64
65
This method is only available in the systemd implementation,
@@ -67,7 +68,7 @@ def is_masked(self):
67
68
raise NotImplementedError
68
69
69
70
@functools .cached_property
70
- def systemd_properties (self ):
71
+ def systemd_properties (self ) -> dict [ str , Any ] :
71
72
"""Properties of the service (unit).
72
73
73
74
Return service properties as a `dict`,
0 commit comments