SomeOtherThingAsAsingleton.work()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
class SomeOtherThingAsAsingleton:
2
    def work(self):
3
        return 1
4
5
6
class SomeService:
7
    def __init__(self, other: SomeOtherThingAsAsingleton):
8
        self.other = other
9
10
    def do_it(self):
11
        return self.other.work()
12
13
14
class AThingIMightNeed:
15
    service: SomeService
16
17
    def __init__(self, service: SomeService):
18
        self.service = service
19
20
    def do_it(self):
21
        return self.service.do_it()
22