Passed
Pull Request — dev (#836)
by Uwe
03:17 queued 01:53
created

solph.components._source   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 Source.__init__() 0 3 1
A Source.constraint_group() 0 2 1
1
# -*- coding: utf-8 -*-
2
3
"""
4
solph version of oemof.network.Source
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 Source(on.Source):
22
    """An object with one output flow."""
23
24
    def __init__(self, *args, **kwargs):
25
        super().__init__(*args, **kwargs)
26
        check_node_object_for_missing_attribute(self, "outputs")
27
28
    def constraint_group(self):
29
        pass
30