bjmorgan/lattice_mc

View on GitHub

Showing 24 of 24 total issues

Similar blocks of code found in 4 locations. Consider refactoring.
Open

sites.append( lattice_site.Site( grid[ i, j, 0 ], r, neighbours, 0.0, site_labels[0] ) )
Severity: Major
Found in lattice_mc/init_lattice.py and 3 other locations - About 45 mins to fix
lattice_mc/init_lattice.py on lines 76..76
lattice_mc/init_lattice.py on lines 82..82
lattice_mc/init_lattice.py on lines 88..88

Similar blocks of code found in 4 locations. Consider refactoring.
Open

sites.append( lattice_site.Site( grid[ i, j, 1 ], r, neighbours, 0.0, site_labels[1] ) )
Severity: Major
Found in lattice_mc/init_lattice.py and 3 other locations - About 45 mins to fix
lattice_mc/init_lattice.py on lines 70..70
lattice_mc/init_lattice.py on lines 82..82
lattice_mc/init_lattice.py on lines 88..88

Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def __init__( self, initial_site, final_site, nearest_neighbour_energy=False, coordination_number_energy=False, jump_lookup_table=None ):
Severity: Minor
Found in lattice_mc/jump.py - About 35 mins to fix

    Function set_site_energies has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def set_site_energies( self, energies ):
    """
    Set the energies for every site in the lattice according to the site labels.
     
    Args:
    Severity: Minor
    Found in lattice_mc/lattice.py - About 25 mins to fix
    Severity
    Category
    Status
    Source
    Language