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:23
created

b2blaze.b2lib   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 16.66%

Importance

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

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