Passed
Push — 2.x ( 054a36...979e2b )
by Jordi
06:15
created

senaite.core.events.upgrade   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A AfterUpgradeStepEvent.__init__() 0 2 1
A BeforeUpgradeStepEvent.__init__() 0 2 1
1
# -*- coding: utf-8 -*-
2
3
from zope.interface import Interface
4
from zope.interface import implements
5
6
7
class IBeforeUpgradeStepEvent(Interface):
8
    """An event fired before the upgrade step started
9
    """
10
11
12
class IAfterUpgradeStepEvent(Interface):
13
    """An event fired after the upgrade step completed
14
    """
15
16
17
class BeforeUpgradeStepEvent(object):
18
    implements(IBeforeUpgradeStepEvent)
19
20
    def __init__(self, context):
21
        self.context = context
22
23
24
class AfterUpgradeStepEvent(object):
25
    implements(IAfterUpgradeStepEvent)
26
27
    def __init__(self, context):
28
        self.context = context
29