Skip to content
Snippets Groups Projects
Commit 628d2667 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon: Committed by Georgy Moshkin
Browse files

fix(test): fix some pyright warnings

parent f76ac423
No related branches found
No related tags found
1 merge request!131fix(test): fix some pyright warnings
Pipeline #6338 passed
...@@ -167,7 +167,7 @@ class Instance: ...@@ -167,7 +167,7 @@ class Instance:
return f"Instance({self.instance_id}, listen={self.listen})" return f"Instance({self.instance_id}, listen={self.listen})"
@contextmanager @contextmanager
def connect(self, timeout: int): def connect(self, timeout: int | float):
c = Connection( c = Connection(
self.host, self.host,
self.port, self.port,
...@@ -180,12 +180,12 @@ class Instance: ...@@ -180,12 +180,12 @@ class Instance:
c.close() c.close()
@normalize_net_box_result @normalize_net_box_result
def call(self, fn, *args, timeout: int = 1): def call(self, fn, *args, timeout: int | float = 1):
with self.connect(timeout) as conn: with self.connect(timeout) as conn:
return conn.call(fn, args) return conn.call(fn, args)
@normalize_net_box_result @normalize_net_box_result
def eval(self, expr, *args, timeout: int = 1): def eval(self, expr, *args, timeout: int | float = 1):
with self.connect(timeout) as conn: with self.connect(timeout) as conn:
return conn.eval(expr, *args) return conn.eval(expr, *args)
...@@ -271,9 +271,6 @@ class Instance: ...@@ -271,9 +271,6 @@ class Instance:
def remove_data(self): def remove_data(self):
rmtree(self.data_dir) rmtree(self.data_dir)
def __hash__(self):
return hash(self.id) ^ hash(self.cluster_id) ^ hash(self.listen)
def _raft_status(self) -> RaftStatus: def _raft_status(self) -> RaftStatus:
status = self.call("picolib.raft_status") status = self.call("picolib.raft_status")
assert isinstance(status, dict) assert isinstance(status, dict)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment