inasafe/inasafe

View on GitHub
safe/gis/vector/assign_highest_value.py

Summary

Maintainability
A
1 hr
Test Coverage

Function assign_highest_value has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def assign_highest_value(exposure, hazard):
    """Assign the highest hazard value to an indivisible feature.

    For indivisible polygon exposure layers such as buildings, we need to
    assigned the greatest hazard that each polygon touches and use that as the
Severity: Minor
Found in safe/gis/vector/assign_highest_value.py - About 1 hr to fix

    Avoid deeply nested control flow statements.
    Open

                        for index, value in zip(indices, area.attributes()):
                            update_map[building.id()][index] = value
    
                        # We don't want this building again, let's remove it from
                        # the index.
    Severity: Major
    Found in safe/gis/vector/assign_highest_value.py - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status