inasafe/inasafe

View on GitHub

Showing 305 of 1,497 total issues

File default.py has 591 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# coding=utf-8

"""
Module for basic renderer we support. Currently we have:

Severity: Major
Found in safe/report/processors/default.py - About 1 day to fix

    ImpactFunction has 67 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ImpactFunction():
    
        """Impact Function."""
    
        def __init__(self):
    Severity: Major
    Found in safe/impact_function/impact_function.py - About 1 day to fix

      File aggregate_postprocessors.py has 563 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # coding=utf-8
      """Module used to generate context for aggregation postprocessors sections.
      """
      
      from collections import OrderedDict
      Severity: Major
      Found in safe/report/extractors/aggregate_postprocessors.py - About 1 day to fix

        File base_metadata.py has 560 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # coding=utf-8
        """This module base metadata implementation."""
        
        
        import abc
        Severity: Major
        Found in safe/metadata/base_metadata.py - About 1 day to fix

          File hazard.py has 529 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # coding=utf-8
          
          """Definitions relating to hazards."""
          
          from safe.definitions.caveats import (
          Severity: Major
          Found in safe/definitions/hazard.py - About 1 day to fix

            File html_report.py has 516 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # coding=utf-8
            
            """QGIS Expressions which are available in the QGIS GUI interface."""
            
            from os.path import dirname, join, exists
            Severity: Major
            Found in safe/report/expressions/html_report.py - About 1 day to fix

              File keyword_io.py has 507 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # coding=utf-8
              """Keyword IO implementation."""
              
              
              import logging
              Severity: Major
              Found in safe/utilities/keyword_io.py - About 1 day to fix

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

                # coding=utf-8
                
                """Utilities for InaSAFE."""
                
                import colorsys
                Severity: Major
                Found in safe/common/utilities.py - About 1 day to fix

                  Plugin has 56 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Plugin():
                  
                      """The QGIS interface implementation for the InaSAFE plugin.
                  
                      This class acts as the 'glue' between QGIS and our custom logic.
                  Severity: Major
                  Found in safe/plugin.py - About 1 day to fix

                    File print_report_dialog.py has 477 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # coding=utf-8
                    """This is a dialog to print a custom map report.
                    """
                    import logging
                    from copy import deepcopy
                    Severity: Minor
                    Found in safe/gui/tools/print_report_dialog.py - About 7 hrs to fix

                      File units.py has 477 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # coding=utf-8
                      
                      """Definitions relating to units."""
                      
                      from collections import OrderedDict
                      Severity: Minor
                      Found in safe/definitions/units.py - About 7 hrs to fix

                        File map_report.py has 471 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        # coding=utf-8
                        
                        """QGIS Expressions which are available in the QGIS GUI interface."""
                        
                        import os
                        Severity: Minor
                        Found in safe/report/expressions/map_report.py - About 7 hrs to fix

                          File metadata.py has 469 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # coding=utf-8
                          """Metadata Utilities."""
                          import logging
                          import os
                          from copy import deepcopy
                          Severity: Minor
                          Found in safe/utilities/metadata.py - About 7 hrs to fix

                            File exposure.py has 462 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            # coding=utf-8
                            """Definitions relating to exposure in InaSAFE."""
                            
                            from safe.definitions.caveats import caveat_incomplete_data
                            from safe.definitions.concepts import concepts
                            Severity: Minor
                            Found in safe/definitions/exposure.py - About 7 hrs to fix

                              Function content has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              def content():
                                  """Helper method that returns just the content.
                              
                                  This method was added so that the text could be reused in the
                                  dock_help module.
                              Severity: Major
                              Found in safe/gui/tools/help/definitions_help.py - About 6 hrs to fix

                                File analysis_detail.py has 453 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # coding=utf-8
                                
                                """Module used to generate context for analysis detail section."""
                                
                                
                                
                                Severity: Minor
                                Found in safe/report/extractors/analysis_detail.py - About 6 hrs to fix

                                  File peta_bencana_dialog.py has 450 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  # coding=utf-8
                                  """
                                  InaSAFE Disaster risk assessment tool developed by AusAid -
                                  **Import Dialog.**
                                  
                                  
                                  Severity: Minor
                                  Found in safe/gui/tools/peta_bencana_dialog.py - About 6 hrs to fix

                                    File osm_downloader_dialog.py has 429 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # coding=utf-8
                                    """
                                    InaSAFE Disaster risk assessment tool developed by AusAid -
                                    **Import Dialog.**
                                    
                                    
                                    Severity: Minor
                                    Found in safe/gui/tools/osm_downloader_dialog.py - About 6 hrs to fix

                                      Function dynamic_translations has 154 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      def dynamic_translations():
                                          """These listed here so they get translated apriori to loading data."""
                                          # Bangunan DKI
                                          tr('DKI buildings')
                                          # Banjir seperti 2007
                                      Severity: Major
                                      Found in safe/common/dynamic_translations.py - About 6 hrs to fix

                                        File composer.py has 420 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        # coding=utf-8
                                        """Module used to generate context for composer related rendering.
                                        
                                        Particular example are:
                                        - Map rendering
                                        Severity: Minor
                                        Found in safe/report/extractors/composer.py - About 6 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language