Passed
Push — dev ( eccf95...cfc126 )
by Uwe
06:21 queued 04:51
created

solph.components._sink   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Sink.constraint_group() 0 2 1
A Sink.__init__() 0 3 1
1
# -*- coding: utf-8 -*-
2
3
"""
4
solph version of oemof.network.Sink
5
6
SPDX-FileCopyrightText: Uwe Krien <[email protected]>
7
SPDX-FileCopyrightText: Simon Hilpert
8
SPDX-FileCopyrightText: Cord Kaldemeyer
9
SPDX-FileCopyrightText: Stephan Günther
10
SPDX-FileCopyrightText: Birgit Schachler
11
12
SPDX-License-Identifier: MIT
13
14
"""
15
16
from oemof.network import network as on
17
18
from oemof.solph._helpers import check_node_object_for_missing_attribute
19
20
21
class Sink(on.Sink):
22
    """An object with one input flow."""
23
24
    def __init__(self, *args, **kwargs):
25
        super().__init__(*args, **kwargs)
26
        check_node_object_for_missing_attribute(self, "inputs")
27
28
    def constraint_group(self):
29
        pass
30