File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11
11
# limitations under the License.
12
12
13
13
import socket
14
+ from typing import List
15
+ from typing import Optional
16
+ from typing import Tuple
14
17
15
18
from testinfra .modules .base import Module
16
19
from testinfra .utils import cached_property
@@ -121,7 +124,7 @@ def is_listening(self):
121
124
)
122
125
123
126
@property
124
- def clients (self ):
127
+ def clients (self ) -> List [ Optional [ Tuple [ str , int ]]] :
125
128
"""Return a list of clients connected to a listening socket
126
129
127
130
For tcp and udp sockets a list of pair (adress, port) is returned.
@@ -134,7 +137,7 @@ def clients(self):
134
137
[None, None, None]
135
138
136
139
"""
137
- sockets = []
140
+ sockets : List [ Optional [ Tuple [ str , int ]]] = []
138
141
for sock in self ._iter_sockets (False ):
139
142
if sock [0 ] != self .protocol :
140
143
continue
You can’t perform that action at this time.
0 commit comments