Showing 17 of 21 total issues
Consider simplifying this complex logical expression. Open
Open
if all(c_rank == 14 for c_rank in ranks):
return 0
elif all(c_rank == 13 for c_rank in ranks):
return 1
elif all(c_rank == 12 for c_rank in ranks):
Card
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Card:
"""Card to represent a poker card."""
def __init__(self, rank: Union[str, int], suit: str):
"""Instanciate the card."""
Function cssLoaders
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
Function __init__
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(
self,
strategy_interval: int,
n_iterations: int,
lcfr_threshold: int,
Avoid deeply nested control flow statements. Open
Open
if action == "quit":
user_results.add_result(strategy_path, agent, state, og_name_to_name)
log.info(term.pink("quit"))
break
elif action == "new game":
Avoid deeply nested control flow statements. Open
Open
if selected_action_i < 0:
selected_action_i = len(legal_actions) - 1
elif key.name == "KEY_RIGHT":
Avoid too many return
statements within this function. Open
Open
return 12 if suited else 22
Avoid too many return
statements within this function. Open
Open
return 7 if suited else 17
Avoid too many return
statements within this function. Open
Open
return 9 if suited else 19
Avoid too many return
statements within this function. Open
Open
return 8 if suited else 18
Avoid too many return
statements within this function. Open
Open
return 11 if suited else 21
Avoid too many return
statements within this function. Open
Open
return 13 if suited else 23
Avoid too many return
statements within this function. Open
Open
return 6 if suited else 16
Avoid too many return
statements within this function. Open
Open
return 10 if suited else 20
Avoid too many return
statements within this function. Open
Open
return 14 if suited else 24
Avoid too many return
statements within this function. Open
Open
return 4
Avoid too many return
statements within this function. Open
Open
return 5 if suited else 15