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
Push — master ( 094cb0...b11aa0 )
by Benjamin
01:16
created

Updater.update()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
dl 0
loc 2
rs 10
1
import git
2
import os
3
4
5
class Updater(object):
6
    def __init__(self):
7
        self.repo = git.Repo(os.path.dirname(os.path.abspath(__file__)))
8
        self.head = self.repo.remotes.origin
9
10
    def check(self):
11
        self.head.fetch()
12
        diff = self.head.diff()
13
14
        return bool(diff)
15
16
    def update(self):
17
        self.head.pull()