inasafe/inasafe

View on GitHub

Showing 305 of 1,497 total issues

File extra_keywords.py has 411 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# coding=utf-8

"""Definitions relating to extra keywords."""

from datetime import datetime
Severity: Minor
Found in safe/definitions/extra_keywords.py - About 5 hrs to fix

    File general_report.py has 408 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # coding=utf-8
    """Module used to extract context for general summary."""
    from safe.definitions.exposure import exposure_population
    from safe.definitions.fields import (
        hazard_count_field,
    Severity: Minor
    Found in safe/report/extractors/general_report.py - About 5 hrs to fix

      File analysis_provenance_details.py has 400 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # coding=utf-8
      """Module used to generate context for analysis provenance details."""
      
      
      from collections import OrderedDict
      Severity: Minor
      Found in safe/report/extractors/analysis_provenance_details.py - About 5 hrs to fix

        Dock has 41 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Dock(QDockWidget, FORM_CLASS):
        
            """Dock implementation class for the inaSAFE plugin."""
        
            def __init__(self, iface):
        Severity: Minor
        Found in safe/gui/widgets/dock.py - About 5 hrs to fix

          File tools.py has 389 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # coding=utf-8
          
          """Tools for vector layers."""
          
          
          
          Severity: Minor
          Found in safe/gis/vector/tools.py - About 5 hrs to fix

            File svg_charts.py has 384 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # coding=utf-8
            """Module to generate context for SVG Chart.
            
            This context then used for SVG Jinja2 generation.
            """
            Severity: Minor
            Found in safe/report/extractors/infographic_elements/svg_charts.py - About 5 hrs to fix

              File report_metadata.py has 377 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # coding=utf-8
              """Module for class container of Report and ReportComponent Metadata.
              """
              
              from copy import deepcopy
              Severity: Minor
              Found in safe/report/report_metadata.py - About 5 hrs to fix

                File contour.py has 370 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # coding=utf-8
                """Create contour from shakemap raster layer."""
                
                import logging
                import os
                Severity: Minor
                Found in safe/gis/raster/contour.py - About 4 hrs to fix

                  OptionsDialog has 37 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class OptionsDialog(QDialog, FORM_CLASS):
                  
                      """Options dialog for the InaSAFE plugin."""
                  
                      def __init__(self, iface, parent=None, qsetting=''):
                  Severity: Minor
                  Found in safe/gui/tools/options_dialog.py - About 4 hrs to fix

                    MultiExposureImpactFunction has 37 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class MultiExposureImpactFunction():
                    
                        """Multi-exposure wrapper.
                    
                        .. versionadded:: 4.3
                    Severity: Minor
                    Found in safe/impact_function/multi_exposure_wrapper.py - About 4 hrs to fix

                      File prepare_vector_layer.py has 355 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # coding=utf-8
                      
                      """Prepare layers for InaSAFE."""
                      
                      
                      
                      Severity: Minor
                      Found in safe/gis/vector/prepare_vector_layer.py - About 4 hrs to fix

                        ImpactReport has 35 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class ImpactReport():
                        
                            """A class for creating and generating report.
                        
                            .. versionadded:: 4.0
                        Severity: Minor
                        Found in safe/report/impact_report.py - About 4 hrs to fix

                          File options_help.py has 352 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # coding=utf-8
                          """Help text for options dialog."""
                          
                          from safe import messaging as m
                          from safe.messaging import styles
                          Severity: Minor
                          Found in safe/gui/tools/help/options_help.py - About 4 hrs to fix

                            Function __init__ has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def __init__(self, parent=None, iface=None, dock=None):
                                    """Constructor for the dialog.
                            
                                    .. note:: In QtDesigner the advanced editor's predefined keywords
                                       list should be shown in english always, so when adding entries to
                            Severity: Major
                            Found in safe/gui/tools/wizard/wizard_dialog.py - About 4 hrs to fix

                              File wizard_step_browser.py has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              # coding=utf-8
                              """Wizard Step Browser."""
                              
                              
                              import os
                              Severity: Minor
                              Found in safe/gui/tools/wizard/wizard_step_browser.py - About 4 hrs to fix

                                File provenance.py has 336 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # coding=utf-8
                                """Provenance Keys."""
                                
                                from safe.definitions.layer_purposes import (
                                    layer_purpose_exposure_summary,
                                Severity: Minor
                                Found in safe/definitions/provenance.py - About 4 hrs to fix

                                  BaseMetadata has 32 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class BaseMetadata(with_metaclass(abc.ABCMeta, object)):
                                  
                                      """
                                      Abstract Metadata class, this has to be subclassed.
                                  
                                  
                                  Severity: Minor
                                  Found in safe/metadata/base_metadata.py - About 4 hrs to fix

                                    File utilities.py has 333 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # coding=utf-8
                                    
                                    """Utilities module."""
                                    
                                    
                                    
                                    Severity: Minor
                                    Found in safe/utilities/utilities.py - About 4 hrs to fix

                                      File step_fc90_analysis.py has 326 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      # coding=utf-8
                                      """InaSAFE Wizard Step Analysis."""
                                      
                                      import logging
                                      import os
                                      Severity: Minor
                                      Found in safe/gui/tools/wizard/step_fc90_analysis.py - About 3 hrs to fix

                                        File extent_selector_dialog.py has 323 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        # coding=utf-8
                                        """Extent selector dialog."""
                                        
                                        import logging
                                        import sqlite3
                                        Severity: Minor
                                        Found in safe/gui/tools/extent_selector_dialog.py - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language