Skip to content

Commit 8526647

Browse files
Del args, kwargs (#255)
1 parent b2afa06 commit 8526647

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Diff for: src/common/exceptions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44

55
class InvalidOraclesRequestError(ValueError):
6-
def __init__(self, *args, **kwargs): # type: ignore
7-
super().__init__(INVALID_ORACLES_REQUEST, *args, **kwargs)
6+
def __init__(self):
7+
super().__init__(INVALID_ORACLES_REQUEST)
88

99

1010
class NotEnoughOracleApprovalsError(ValueError):
11-
def __init__(self, num_votes: int, threshold: int, *args, **kwargs): # type: ignore
12-
super().__init__(NOT_ENOUGH_ORACLE_APPROVALS, *args, **kwargs)
11+
def __init__(self, num_votes: int, threshold: int):
12+
super().__init__(NOT_ENOUGH_ORACLE_APPROVALS)
1313
self.num_votes = num_votes
1414
self.threshold = threshold

Diff for: src/common/utils.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ def process_oracles_approvals(
9494
if len(votes) < votes_threshold:
9595
# not enough oracles have approved the request
9696
# Fill `failed_endpoints` later
97-
raise NotEnoughOracleApprovalsError(
98-
num_votes=len(votes), threshold=votes_threshold, failed_endpoints=[]
99-
)
97+
raise NotEnoughOracleApprovalsError(num_votes=len(votes), threshold=votes_threshold)
10098

10199
signatures = b''
102100
for _, signature in sorted(votes, key=lambda x: Web3.to_int(hexstr=x[0]))[:votes_threshold]:

Diff for: src/validators/exceptions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ class KeystoreException(Exception):
77

88

99
class RegistryRootChangedError(ValueError):
10-
def __init__(self, *args, **kwargs):
11-
super().__init__(REGISTRY_ROOT_CHANGED, *args, **kwargs)
10+
def __init__(self):
11+
super().__init__(REGISTRY_ROOT_CHANGED)
1212

1313

1414
class ValidatorIndexChangedError(ValueError):
15-
def __init__(self, *args, **kwargs):
16-
super().__init__(VALIDATOR_INDEX_CHANGED, *args, **kwargs)
15+
def __init__(self):
16+
super().__init__(VALIDATOR_INDEX_CHANGED)

Diff for: src/validators/execution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def get_from_block() -> BlockNumber:
4545

4646
@staticmethod
4747
# pylint: disable-next=unused-argument
48-
async def process_events(events: list[EventData], *args, **kwargs) -> None: # type: ignore
48+
async def process_events(events: list[EventData], to_block: BlockNumber) -> None:
4949
validators = process_network_validator_events(events)
5050
NetworkValidatorCrud().save_network_validators(validators)
5151

0 commit comments

Comments
 (0)