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.

Configure   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 6
c 5
b 0
f 0
dl 0
loc 20
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A get_config() 0 2 1
A __init__() 0 2 1
A read_config() 0 10 3
A set_config() 0 2 1
1
import yaml
2
3
4
class Configure(object):
5
    def __init__(self):
6
        self.__config = None
7
8
    def get_config(self):
9
        return self.__config
10
11
    def read_config(self, file_name='config.yaml'):
12
        with open(file_name, 'r') as stream:
13
            try:
14
                self.__config = yaml.load(stream)
15
                return True
16
            except yaml.YAMLError:
17
                #todo write error message to log/display
18
                pass
19
20
        return False
21
22
    def set_config(self):
23
        self.__config = None
24
25