Showing 30 of 30 total issues
Avoid too many return
statements within this function. Open
return multi
Avoid too many return
statements within this function. Open
return self.parse_attack(attacks)
Avoid too many return
statements within this function. Open
return attacks[0]
Avoid too many return
statements within this function. Open
return self.parse_attack(attacks)
Avoid too many return
statements within this function. Open
return equip_standard_weapon(self, weapon_name=attack)
Avoid too many return
statements within this function. Open
return self.parse_attacks(attacks)
Function attack
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def attack(self,
enemy_ac: int,
advantage: Optional[int] = None,
add_ability_to_damage=True,
munchkin=False) -> int:
- 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 __setitem__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __setitem__(self, item: str, value):
"""
Sets attributes, not a subscript proper. Does some cleaning though
formerly _set.
Corrects the value to a known type if of known, thanks to self._attribute_types
- 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 find_target
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_target(self, valid: bool = True):
"""
calls ``self.find_targets`` and ``self.is_valid_target``
:param valid: filter by valid per self.is_valid_target
- 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 _crit_check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _crit_check(self, result, verbose=0):
"""
Checks if the dice is a crit.
:param result: dice roll result.
- 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"