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.
Test Failed
Pull Request — master (#29)
by
unknown
02:03
created

b2blaze.b2lib   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
eloc 20
dl 0
loc 38
ccs 15
cts 18
cp 0.8333
rs 10
c 0
b 0
f 0
wmc 6

2 Methods

Rating   Name   Duplication   Size   Complexity  
A B2.__init__() 0 16 5
A B2.buckets() 0 7 1
1
"""
2
Copyright George Sibble 2018
3
"""
4 1
import os
5 1
from b2blaze.b2_exceptions import B2ApplicationKeyNotSet, B2KeyIDNotSet
6 1
from b2blaze.connector import B2Connector
7 1
from b2blaze.models.bucket_list import B2Buckets
8
9 1
class B2(object):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
10
    """
11
12
    """
13 1
    def __init__(self, key_id=None, application_key=None):
14
        """
15
16
        :param key_id:
17
        :param application_key:
18
        """
19 1
        if key_id is None or application_key is None:
20 1
            key_id = os.environ.get('B2_KEY_ID', None)
21 1
            application_key = os.environ.get('B2_APPLICATION_KEY', None)
22 1
        if key_id is None:
23
            raise B2KeyIDNotSet
24 1
        if application_key is None:
25
            raise B2ApplicationKeyNotSet
26 1
        self.key_id = key_id
27 1
        self.application_key = application_key
28 1
        self.connector = B2Connector(key_id=self.key_id, application_key=self.application_key)
29
30
31 1
    @property
32
    def buckets(self):
33
        """
34
35
        :return:
36
        """
37
        return B2Buckets(connector=self.connector)
38
0 ignored issues
show
coding-style introduced by
Trailing newlines
Loading history...
39