luizirber/tam

View on GitHub

Showing 3 of 3 total issues

Function install_python has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

def install_python(version, arch, home):
    print("Installing Python", version, "for", arch, "bit architecture to", home)
    if exists(home):
        return

Severity: Minor
Found in ci/appveyor-bootstrap.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

Function download_latest_artifacts has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

def download_latest_artifacts(account_project, build_id):
    """Download all the artifacts from the latest build."""
    if build_id is None:
        url = "https://ci.appveyor.com/api/projects/{}".format(account_project)
    else:
Severity: Minor
Found in ci/appveyor-download.py - About 45 mins 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

Function new_tile has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def new_tile(name, label="", tilecolor="white", textcolor="black", concentration=1, glues=None):
Severity: Minor
Found in src/tam/defs.py - About 45 mins to fix
    Severity
    Category
    Status
    Source
    Language