@@ -17,18 +17,18 @@ def is_debugpy_installed() -> bool:
17
17
18
18
def wait_for_debugpy_connected () -> bool :
19
19
if is_debugpy_installed ():
20
- import debugpy
20
+ import debugpy # noqa: T100
21
21
22
22
_logger .info ("wait for debugpy client" )
23
- debugpy .wait_for_client ()
23
+ debugpy .wait_for_client () # noqa: T100
24
24
25
25
return True
26
26
return False
27
27
28
28
29
29
def enable_debugpy (port : int , addresses : Union [Sequence [str ], str , None ] = None ) -> bool :
30
30
if is_debugpy_installed ():
31
- import debugpy
31
+ import debugpy # noqa: T100
32
32
33
33
if addresses is None :
34
34
addresses = ["127.0.0.1" ]
@@ -37,25 +37,25 @@ def enable_debugpy(port: int, addresses: Union[Sequence[str], str, None] = None)
37
37
addresses = [addresses ] # type: ignore
38
38
39
39
for address in addresses :
40
- debugpy .listen ((address , port ))
40
+ debugpy .listen ((address , port )) # noqa: T100
41
41
42
42
return True
43
43
return False
44
44
45
45
46
46
def start_debugpy (end_point : Union [Tuple [str , int ], int ], wait_for_client : bool ) -> Optional [int ]:
47
47
if is_debugpy_installed ():
48
- import debugpy
48
+ import debugpy # noqa: T100
49
49
50
50
if isinstance (end_point , int ):
51
51
end_point = ("127.0.0.1" , end_point )
52
52
53
53
real_port = find_free_port (end_point [1 ])
54
54
55
- debugpy .listen ((end_point [0 ], real_port ))
55
+ debugpy .listen ((end_point [0 ], real_port )) # noqa: T100
56
56
57
57
if wait_for_client :
58
58
_logger .info ("wait for debugpy client" )
59
- debugpy .wait_for_client ()
59
+ debugpy .wait_for_client () # noqa: T100
60
60
return real_port
61
61
return None
0 commit comments