Showing 3 of 3 total issues
File card.py
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""A class representing an individual Dobble playing card.
Typical usage example:
>>> emoji_names = ["light bulb", "sun", "maple leaf", "unicorn", "bomb"]
File utils.py
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Utility functions used in the "dobble" package.
Functions:
* get_emoji_group: Get the "group" attribute of an emoji.
* get_emoji_hexcode: Get the "hexcode" attribute of an emoji.
Function compute_incidence_matrix
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
Open
def compute_incidence_matrix(order: int) -> np.ndarray:
"""Compute the canonical incidence matrix of an FPP.
This function computes the canonical incidence matrix of a finite
projective plane (FPP) of prime order based on the construction by
- 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"