#22 blackened code

This commit is contained in:
Alok Saldanha
2020-08-10 17:56:32 -04:00
parent 63cdfe1953
commit bfa80f7ef8
15 changed files with 295 additions and 151 deletions
+6 -2
View File
@@ -22,8 +22,10 @@ process_backend = SubprocessBackend()
def is_port_in_use(port):
import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
return s.connect_ex(('localhost', port)) == 0
return s.connect_ex(("localhost", port)) == 0
class BackendCache:
def __init__(self):
@@ -38,7 +40,9 @@ class BackendCache:
matches = [
c
for c in contents
if c.key.dataset == key.dataset and c.key.annotation_file == key.annotation_file and c.status != "terminated"
if c.key.dataset == key.dataset
and c.key.annotation_file == key.annotation_file
and c.status != "terminated"
]
if len(matches) == 0: