GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#44)
by
unknown
01:14
created

qtsass.watchers.api   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 8
eloc 24
dl 0
loc 59
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A Watcher.stop() 0 3 1
A Watcher.__init__() 0 6 1
A Watcher.setup() 0 3 1
A Watcher.compile() 0 3 1
A Watcher.disconnect() 0 3 1
A Watcher.join() 0 3 1
A Watcher.connect() 0 5 1
A Watcher.start() 0 3 1
1
# -*- coding: utf-8 -*-
2
# -----------------------------------------------------------------------------
3
# Copyright (c) 2015 Yann Lanthony
4
# Copyright (c) 2017-2018 Spyder Project Contributors
5
#
6
# Licensed under the terms of the MIT License
7
# (See LICENSE.txt for details)
8
# -----------------------------------------------------------------------------
9
"""qtsass.watchers.api - FS Watcher api."""
10
11
# yapf: disable
12
13
from __future__ import absolute_import
14
15
# yapf: enable
16
17
18
class Watcher(object):
19
    """Watches a file or directory for changes and calls the provided compiler
20
    whenever a change is detected.
21
    """
22
23
    def __init__(self, watch_dir, source, destination, compiler):
24
        self._watch_dir = watch_dir
25
        self._source = source
26
        self._destination = destination
27
        self._compiler = compiler
28
        self.setup()
29
30
    def compile(self):
31
        print('Watcher.compile - %s > %s' % (self._source, self._destination))
32
        return self._compiler(self._source, self._destination)
33
34
    def setup(self):
35
        """Perform any setup required by this Watcher."""
36
        return NotImplemented
37
38
    def connect(self, fn):
39
        """Connect a handler to be called when this Watcher detects a
40
        file or directory change. Called after setup to connect compile to
41
        as a handler."""
42
        return NotImplemented
43
44
    def disconnect(self, fn):
45
        """Disconnect a handler from this Watcher."""
46
        return NotImplemented
47
48
    def start(self):
49
        """Start this Watcher."""
50
        return NotImplemented
51
52
    def stop(self):
53
        """Stop this Watcher."""
54
        return NotImplemented
55
56
    def join(self):
57
        """Wait for this Watcher to finish."""
58
        return NotImplemented
59