mrvnthss/dobble

View on GitHub

Showing 3 of 3 total issues

File card.py has 353 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""A class representing an individual Dobble playing card.

Typical usage example:

  >>> emoji_names = ["light bulb", "sun", "maple leaf", "unicorn", "bomb"]
Severity: Minor
Found in dobble/card.py - About 4 hrs to fix

    File utils.py has 254 lines of code (exceeds 250 allowed). Consider refactoring.
    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.
    Severity: Minor
    Found in dobble/utils.py - About 2 hrs to fix

      Function compute_incidence_matrix has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring.
      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
      Severity: Minor
      Found in dobble/planes.py - About 1 hr to fix

      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

      Severity
      Category
      Status
      Source
      Language