Passed
Push — master ( 193da7...4bb259 )
by Simon
01:36 queued 11s
created

CandidateNoMem.__init__()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nop 8
dl 0
loc 5
rs 10
c 0
b 0
f 0

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
6
from .candidate_base import Candidate
7
8
9
class CandidateNoMem(Candidate):
10
    def __init__(
11
        self, obj_func, func_para, search_space, init_para, memory, verb, hyperactive
12
    ):
13
        super().__init__(
14
            obj_func, func_para, search_space, init_para, memory, verb, hyperactive
15
        )
16
17