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
01:20
created

b2blaze.b2lib   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 16.66%

Importance

Changes 0
Metric Value
eloc 21
dl 0
loc 41
ccs 3
cts 18
cp 0.1666
rs 10
c 0
b 0
f 0
wmc 6

2 Methods

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