@@ -92,9 +92,7 @@ def resume(self):
9292 self .proc .send_signal (signal .SIGCONT )
9393
9494 def is_alive (self ):
95- # pyrefly: ignore [missing-attribute]
9695 self .proc .poll ()
97- # pyrefly: ignore [missing-attribute]
9896 return self .proc .returncode is None
9997
10098 def get_log (self ):
@@ -115,7 +113,6 @@ def dump(self):
115113 default) so we can debug better."""
116114
117115 try :
118- # pyrefly: ignore [missing-attribute]
119116 stdout , stderr = self .proc .communicate ()
120117 except Exception :
121118 stdout , stderr = b"" , b""
@@ -187,24 +184,20 @@ def __init__(
187184 addr = "::1" , port = thriftPort
188185 )
189186 else :
190- # pyrefly: ignore [bad-assignment]
191187 self .thrift_client = None
192188
193189 def _sendall (self , s ):
194190 if type (s ) is not bytes :
195191 s = s .encode ("utf8" )
196- # pyrefly: ignore [missing-attribute]
197192 self .socket .sendall (s )
198193
199194 def _fdread (self , n ):
200- # pyrefly: ignore [missing-attribute]
201195 data = self .fd .read (n )
202196 if data is not None and type (data ) is not str :
203197 data = data .decode ("utf8" , errors = "backslashreplace" )
204198 return data
205199
206200 def _fdreadline (self ):
207- # pyrefly: ignore [missing-attribute]
208201 data = self .fd .readline ()
209202 if data is not None and type (data ) is not str :
210203 data = data .decode ("utf8" )
@@ -250,7 +243,6 @@ def ensure_connected(self):
250243 except Exception as e :
251244 retry_count += 1
252245 print (
253- # pyrefly: ignore [missing-attribute]
254246 f"Cannot connect (errno: { e .errno } ). Retry { retry_count } of { self .max_retries } ."
255247 )
256248 self .disconnect ()
@@ -362,10 +354,8 @@ def _get(self, cmd, keys, expect_cas, return_all_info):
362354 payload = self ._fdread (n )
363355 self ._fdread (2 )
364356 if return_all_info :
365- # pyrefly: ignore [unsupported-operation]
366357 res [k ] = dict ({"key" : k , "flags" : f , "size" : n , "value" : payload })
367358 if expect_cas :
368- # pyrefly: ignore [unsupported-operation]
369359 res [k ]["cas" ] = int (parts [4 ])
370360 else :
371361 res [k ] = payload
@@ -436,20 +426,16 @@ def leaseGet(self, keys):
436426 elif line .startswith ("VALUE" ):
437427 v , k , f , n = line .split ()
438428 assert k in keys
439- # pyrefly: ignore [unsupported-operation]
440429 res [k ] = {"value" : self ._fdread (int (n )), "token" : None }
441430 self ._fdread (2 )
442431 elif line .startswith ("LVALUE" ):
443432 v , k , t , f , n = line .split ()
444433 assert k in keys
445- # pyrefly: ignore [unsupported-operation]
446434 res [k ] = {"value" : self ._fdread (int (n )), "token" : int (t )}
447435
448436 def expectNoReply (self ):
449- # pyrefly: ignore [missing-attribute]
450437 self .socket .settimeout (0.5 )
451438 try :
452- # pyrefly: ignore [missing-attribute]
453439 self .socket .recv (1 )
454440 return False
455441 except TimeoutError :
@@ -965,9 +951,7 @@ def is_alive():
965951 return os .path .exists (f"/proc/{ pid } " )
966952 return False
967953
968- # pyrefly: ignore [bad-assignment, bad-override]
969954 self .terminate = terminate
970- # pyrefly: ignore [bad-assignment, bad-override]
971955 self .is_alive = is_alive
972956
973957 if substitute_config_smc_ports and sr_mock_smc_config :
@@ -1075,10 +1059,8 @@ def __init__(
10751059
10761060 MCProcess .__init__ (self , args , asyncPort , pass_fds = pass_fds )
10771061
1078- # pyrefly: ignore [unbound-name]
10791062 if listenSocketThrift is not None :
10801063 listenSocketThrift .close ()
1081- # pyrefly: ignore [unbound-name]
10821064 if listenSocketAsyncMc is not None :
10831065 listenSocketAsyncMc .close ()
10841066
@@ -1100,9 +1082,7 @@ def __init__(self, fifos_dir, extra_args=None):
11001082
11011083 def output (self ):
11021084 if not hasattr (self , "stdout" ):
1103- # pyrefly: ignore [missing-attribute]
11041085 self .proc .terminate ()
1105- # pyrefly: ignore [missing-attribute]
11061086 self .stdout = self .proc .stdout .read ().decode ("ascii" , errors = "ignore" )
11071087 return self .stdout
11081088
0 commit comments