Skip to content

Commit

Permalink
Fix: Solve mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nesitor committed Jun 20, 2024
1 parent be8f583 commit a7816d4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/aleph_vrf/coordinator/executor_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import random
from pathlib import Path
from typing import Any, AsyncIterator, Dict, List
from typing import Any, AsyncIterator, Dict, List, Union

import aiohttp
from aleph_message.models import ItemHash
Expand Down Expand Up @@ -133,10 +133,12 @@ class UsePredeterminedExecutors(ExecutorSelectionPolicy):
Use a hardcoded list of executors.
"""

def __init__(self, executors: List[VRFExecutor]):
def __init__(self, executors: List[Union[Executor, AlephExecutor]]):
self.executors = executors

async def select_executors(self, nb_executors: int) -> List[VRFExecutor]:
async def select_executors(
self, nb_executors: int
) -> List[Union[Executor, AlephExecutor]]:
"""
Returns nb_executors from the hardcoded list of executors.
If nb_executors is lower than the total number of executors, this method
Expand Down

0 comments on commit a7816d4

Please sign in to comment.