Passed
Pull Request — master (#101)
by Simon
02:06
created

search_space_optional   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A SearchSpace.__call__() 0 2 1
A SearchSpace.__init__() 0 6 2
1
import numpy as np
2
from hyperactive import BaseSearchSpace
3
4
5
class SearchSpace:
6
    search_space: dict = None
7
8
    def __init__(self, **params):
9
        super().__init__()
10
11
        for key, value in params.items():
12
            setattr(self, key, value)
13
            self.search_space[key] = value
14
15
    def __call__(self):
16
        return self.search_space
17