Passed
Push — master ( 84bec4...a08110 )
by Konstantin
04:15 queued 01:47
created

set_orientation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A set_orientation() 0 11 2
1
def set_orientation(self, orientation):
2
    """
3
    Set deskewing angle to given number.
4
    Moreover, invalidate self's AlternativeImages
5
    (because they will have been rotated and enlarged
6
     with the angle of the previous value).
7
    """
8
    if hasattr(self, 'invalidate_AlternativeImage'):
9
        # PageType, RegionType:
10
        self.invalidate_AlternativeImage(feature_selector='deskewed')
11
    self.orientation = orientation
12