Conditions | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 8.6667 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | 1 | from .board import ChessBoard |
|
29 | @staticmethod |
||
30 | 1 | def _convert_location_to_board_indices(location): |
|
31 | if isinstance(location, str): |
||
32 | assert len(location) == 2 |
||
33 | alphabet = "abcdefghijklmnopqrstuvwxyz" |
||
34 | col = alphabet.index(location[0].lower()) |
||
35 | row = int(location[1]) - 1 |
||
36 | key = (row, col) |
||
37 | return key |
||
38 | return location |
||
39 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.