prasadtalasila/IRCLogParser

View on GitHub
lib/vis.py

Summary

Maintainability
C
7 hrs
Test Coverage

Function plot_infomap_igraph has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

def plot_infomap_igraph(i_graph, membership, output_directory, output_file_name, show_edges=True, aux_data=None):
    """ 
    Plots  the informap community generated by igraph
    
    Args:
Severity: Minor
Found in lib/vis.py - About 4 hrs 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

File vis.py has 276 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import matplotlib as mpl
import matplotlib.pyplot as plt
plt.switch_backend('Agg')
import numpy as np
from scipy.optimize import curve_fit
Severity: Minor
Found in lib/vis.py - About 2 hrs to fix

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

def plot_infomap_igraph(i_graph, membership, output_directory, output_file_name, show_edges=True, aux_data=None):
Severity: Minor
Found in lib/vis.py - About 45 mins to fix

Error: Missing parentheses in call to 'print'. Did you mean print(print "ERROR generate_probability_distribution")? (<unknown>, line 55)</unknown>
Open

        print "ERROR generate_probability_distribution"
Severity: Minor
Found in lib/vis.py by radon

We encountered an error attempting to analyze this line.

There are no issues that match your filters.

Category
Status