Total Complexity | 1 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import abc |
||
|
|||
2 | from random import Random |
||
3 | from typing import TypeVar |
||
4 | |||
5 | from mandos.model.hits import AbstractHit |
||
6 | from mandos.model.searches import Search |
||
7 | |||
8 | H = TypeVar("H", bound=AbstractHit, covariant=True) |
||
9 | |||
10 | |||
11 | class MetaSearch(Search[H], metaclass=abc.ABCMeta): |
||
12 | def __init__(self, key: str, seed: int): |
||
13 | self.seed = seed |
||
14 | self.random = Random(seed) |
||
15 | super().__init__(key) |
||
16 | |||
17 | |||
18 | __all__ = ["MetaSearch"] |
||
19 |