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

CandidateShortMem.__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
from .candidate_base import Candidate
6
7
8
class CandidateShortMem(Candidate):
9
    def __init__(
10
        self, obj_func, func_para, search_space, init_para, memory, verb, hyperactive
11
    ):
12
        super().__init__(
13
            obj_func, func_para, search_space, init_para, memory, verb, hyperactive
14
        )
15