GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AttribuutGroepKoppeling2.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 22
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 8
nop 5
dl 0
loc 22
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
from kerapu.boom.attribuut.Attribuut import Attribuut
2
from kerapu.boom.attribuut_groep_koppeling.AttribuutGroepKoppeling import AttribuutGroepKoppeling
3
from kerapu.lbz.Subtraject import Subtraject
4 1
5 1
6 1
class AttribuutGroepKoppeling2(AttribuutGroepKoppeling):
7
    """
8
    Klasse voor attribuutgroepkoppelingen met filtertoetswijze 2 (tussen onder- en bovengrens).
9 1
    """
10
11
    # ------------------------------------------------------------------------------------------------------------------
12
    def __init__(self,
13
                 attribute_groep_id: int,
14
                 attribuut: Attribuut,
15 1
                 onder_toets_waarde: int,
16
                 boven_toets_waarde: int):
17
        """
18
        Object constructor.
19
20
        :param int attribute_groep_id: Het ID van deze koppeling.
21
        :param Attribuut attribuut: Het attribuut van deze koppeling.
22
        :param int onder_toets_waarde: De ondergrens.
23
        :param int boven_toets_waarde: De bovengrens.
24
        """
25
        AttribuutGroepKoppeling.__init__(self, attribute_groep_id, attribuut)
26
27
        self._onder_toets_waarde: int = onder_toets_waarde
28 1
        """
29
        De ondergrens om deze koppeling the laten vuren.
30 1
        """
31
32
        self._boven_toets_waarde: int = boven_toets_waarde
33
        """
34
        De bovengrens om deze koppeling the laten vuren.
35
        """
36
37 1
    # ------------------------------------------------------------------------------------------------------------------
38 1
    def test(self, subtraject: Subtraject) -> bool:
39
        """
40
        Test of een subtraject voldoet aan een attribuutgroepkoppeling.
41
42
        :param Subtraject subtraject: Het subtraject.
43
44
        :rtype: bool
45 1
        """
46
        aantal = self._attribuut.tel(subtraject)
47
48
        return self._onder_toets_waarde <= aantal <= self._boven_toets_waarde
49
50
# ----------------------------------------------------------------------------------------------------------------------
51