__init__
method from the base class not called PYL-W023111
12@component(HttpPlugin)
13class Handler(HttpPlugin):
14 def __init__(self, context):15 self.context = context
16
17 @get(r'/api/softraid/arrays')
14
15@component(HttpPlugin)
16class Handler(HttpPlugin):
17 def __init__(self, context):18 self.context = context
19 self.manager = PowerManager.get(self.context)
20
20
21@component(HttpPlugin)
22class Handler(HttpPlugin):
23 def __init__(self, context): 24 self.context = context
25
26 def __serialize_exception(self, e):
16
17@component(HttpPlugin)
18class Handler(HttpPlugin):
19 def __init__(self, context): 20 self.context = context
21 self.manager = TZManager.any(self.context)
22
12
13@component(HttpPlugin)
14class Handler(HttpPlugin):
15 def __init__(self, context):16 self.context = context
17 self.widgets = {x.id:x for x in Widget.all(self.context)}
18
The ancestor class method has an init method which is not called by the derived class. This can cause unintended consequences.