Showing 8 of 16 total issues
Function get_response
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get_response(self, url):
'''指定したurlのhtmlを取得する
'''
time.sleep(self.INTERVAL_TIME)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function plot_state_pic
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def plot_state_pic(board, savepath=None):
pieces_list = []
for i, row in enumerate(board.board):
for j, grid in enumerate(row):
if grid.which_player != ' ':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function plot_pieces
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def plot_pieces(self):
for j in board_indexes:
for i, b_i in enumerate(board_indexes):
grid = self.board[b_i][j]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function wcsa_to_csa
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def wcsa_to_csa(self, d):
'''将棋ウォーズ専用?のCSA形式を一般のCSA形式に変換する.
Args
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function plot_board
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_board(board, savepath=None, title='', mode='pic', last_move_xy=None, figsize=None):
Function get_html
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_html(self, url):
'''指定したurlのhtmlを取得する
'''
time.sleep(self.INTERVAL_TIME)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_kifu_url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_kifu_url(self, users, gtype, csvpath,
Function plot_state_mpl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_state_mpl(board, savepath=None, title='', last_move_xy=None, figsize=(8, 9)):