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.
Completed
Push — develop ( 86b96e...4422cd )
by Theo
01:44
created

chess.piece.Piece   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 93.33%
Metric Value
dl 0
loc 18
rs 10
ccs 14
cts 15
cp 0.9333
wmc 5

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Piece.__str__() 0 2 1
A Piece.__repr__() 0 7 3
1
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 1
class Piece:
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...
4
5 1
    def __init__(self, piece_name, piece_color, moves):
6 1
        self.kind = piece_name
7 1
        self.color = piece_color
8 1
        self.moves = moves
9 1
        self.move_count = 0
10
11 1
    def __str__(self):
12
        return "{} {}".format(self.color, self.kind)
13
14 1
    def __repr__(self):
15 1
        character = self.kind[0]
16 1
        if self.kind == "knight":
17 1
            character = 'n'
18 1
        if self.color == "white":
19 1
            character = character.upper()
20
        return character
21