Passed
Push — master ( 2f86f7...74d48b )
by Markus
01:48
created

tcllib.credentials.Credentials.get_creds()   A

Complexity

Conditions 2

Size

Total Lines 8
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 7
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
# -*- coding: utf-8 -*-
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
3
import base64
4
5
class CredentialsMixin:
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
6
    @staticmethod
7
    def get_creds():
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
8
        creds = {
9
            b"YWNjb3VudA==": b"emhlbmdodWEuZ2Fv",
10
            b"cGFzc3dvcmQ=": b"cWFydUQ0b2s=",
11
        }
12
        params = {base64.b64decode(key): base64.b64decode(val) for key, val in creds.items()}
1 ignored issue
show
Coding Style introduced by
This line is too long as per the coding-style (93/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
13
        return params
14
15
    @staticmethod
16
    def get_creds2():
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
17
        creds = {
18
            b"YWNjb3VudA==": b"VGVsZUV4dFRlc3Q=",
19
            b"cGFzc3dvcmQ=": b"dDA1MjM=",
20
        }
21
        params = {base64.b64decode(key): base64.b64decode(val) for key, val in creds.items()}
1 ignored issue
show
Coding Style introduced by
This line is too long as per the coding-style (93/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
22
        return params
23