NamespaceMismatchError.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.2963

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 2
dl 0
loc 3
ccs 1
cts 3
cp 0.3333
crap 1.2963
rs 10
c 0
b 0
f 0
1 1
class CFDIError(Exception):
2
    """
3
    CFDI Error
4
    """
5
6
7 1
class SchemaValidationError(Exception):
8
    """
9
    Schema Validation Error
10
    """
11
12 1
    def __init__(self, error_log):
13 1
        self.error_log = error_log
14 1
        super().__init__(error_log)
15
16
17 1
class ResponseError(Exception):
18
    """
19
    Request Response Error
20
    """
21
22 1
    def __init__(self, response):
23
        self.response = response
24
        super().__init__(response)
25
26
27 1
class NamespaceMismatchError(Exception):
28
    """
29
    Returned by objectify and xmlify
30
    """
31
32 1
    def __init__(self, node):
33
        self.node = node
34
        super().__init__(node)
35
36
37 1
class DocumentNotFoundError(ResponseError):
38 1
    pass
39
40
41 1
class CFDIInvalidError(ResponseError):
42
    pass
43