Passed
Push — develop ( 29d60b...a27323 )
by Dean
02:35
created

Pull   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 57.14%
Metric Value
dl 0
loc 22
ccs 4
cts 7
cp 0.5714
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 1
1 1
from plugin.sync.core.enums import SyncMode
2 1
from plugin.sync.modes.core.base import Mode
3 1
from plugin.sync.modes.pull.movies import Movies
4 1
from plugin.sync.modes.pull.shows import Shows
5 1
from plugin.sync.modes.pull.lists import LikedLists, PersonalLists, Watchlist
6 1
import elapsed
7 1
import logging
8
9 1
log = logging.getLogger(__name__)
10
11
12 1
class Pull(Mode):
13 1
    mode = SyncMode.Pull
14
15 1
    children = [
16
        Movies,
17
        Shows,
18
19
        LikedLists,
20
        PersonalLists,
21
        Watchlist
22
    ]
23
24 1
    @elapsed.clock
25
    def run(self):
26
        # Fetch changes from trakt.tv
27
        self.trakt.refresh()
28
29
        # Build key table for lookups
30
        self.trakt.build_table()
31
32
        # Run children
33
        self.execute_children('run')
34