Showing 8 of 18 total issues
Function __populate_edges_
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def __populate_edges_(self, vertices):
### edges
edges = set()
# builds a list of edges with random weights, where edges are not duplicated
# Note: no edge is tied to any particular vertex
- 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 setSearchPath
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
setSearchPath() {
const yMax = this.maze.height - 1
const xMax = this.maze.width - 1
const firstCell = this.maze.cells[0][0]
firstCell.g = 0
Function create_cell_from_edges
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function create_cell_from_edges(cell) {
let $cellElem = $("<div/>", {"class": "cell"})
for (let neighbor of cell.neighbors) {
if (neighbor[0] == 0 && neighbor[1] == 1) {
- 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 __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, width, height):
super().__init__(width, height)
### vertices
vertices = [[Vertex(x,y) for x in range(self.width)] for y in range(self.height)]
### edges
- 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 setSearchPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setSearchPath() {
const yMax = this.maze.height - 1
const xMax = this.maze.width - 1
const firstCell = this.maze.cells[0][0]
let fringe = [firstCell]
- 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 setSearchPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setSearchPath() {
const yMax = this.maze.height - 1
const xMax = this.maze.width - 1
let fringe = [this.maze.cells[0][0]]
let searchPath = []
- 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 setSearchPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setSearchPath() {
const yMax = this.maze.height - 1
const xMax = this.maze.width - 1
const firstCell = this.maze.cells[0][0]
firstCell.g = 0
- 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 setSearchPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setSearchPath() {
const yMax = this.maze.height - 1
const xMax = this.maze.width - 1
let fringe = [this.maze.cells[0][0]]
let searchPath = []
- 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"