capocchi/DEVSimPy

View on GitHub

Showing 729 of 1,315 total issues

File Container.py has 3274 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-

## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# Container.py ---
#                      --------------------------------
Severity: Major
Found in Container.py - About 1 wk to fix

    File Editor.py has 1899 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    
    ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
    # Editor.py ---
    #                     --------------------------------
    Severity: Major
    Found in Editor.py - About 5 days to fix

      Function getDiagramFromXMLSES has a Cognitive Complexity of 233 (exceeds 5 allowed). Consider refactoring.
      Open

      def getDiagramFromXMLSES(xmlses_file="", canvas=None):
          """
          """
      
          def GetParent(node):
      Severity: Minor
      Found in XMLModule.py - About 4 days 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 devsimpy.py has 1692 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #!/usr/bin/env python
      # -*- coding: utf-8 -*-
      
      ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
      # devsimpy.py --- DEVSimPy - The Python DEVS GUI modeling and simulation software
      Severity: Major
      Found in devsimpy.py - About 4 days to fix

        Function __setstate__ has a Cognitive Complexity of 194 (exceeds 5 allowed). Consider refactoring.
        Open

            def __setstate__(self, state):
                """ Restore state from the unpickled state values.
                """
        
                python_path = state['python_path']
        Severity: Minor
        Found in Container.py - About 3 days 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 basesimulator.py has 1282 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # -*- coding: Latin-1 -*-
        ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
        # basesimulator.py --- 'Plain' DEVS Model Simulator
        #                     --------------------------------
        #                            Copyright (c) 2013
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/basesimulator.py - About 3 days to fix

          Function OnLeftUp has a Cognitive Complexity of 157 (exceeds 5 allowed). Consider refactoring.
          Open

                  def OnLeftUp(self, event):
                      """
                      """
          
                      cursor = self.GetCursor()
          Severity: Minor
          Found in Container.py - About 3 days 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 basesimulator.py has 998 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # -*- coding: Latin-1 -*-
          """
          Actual simulation kernel
          """
          from .solver import Solver
          Severity: Major
          Found in DEVSKernel/PyPDEVS/pypdevs221/src/basesimulator.py - About 2 days to fix

            File PlotGUI.py has 978 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # -*- coding: utf-8 -*-
            
            ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
            # PlotGUI.py --- Plotting class
            #                     --------------------------------
            Severity: Major
            Found in PlotGUI.py - About 2 days to fix

              Function keyPress has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring.
              Open

                      def keyPress(self, event):
                          """
                          """
              
                          key = event.GetKeyCode()
              Severity: Minor
              Found in Container.py - About 2 days 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 Menu.py has 862 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- coding: utf-8 -*-
              
              ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
              # Menu.py ---
              #                    --------------------------------
              Severity: Major
              Found in Menu.py - About 2 days to fix

                Function __setstate__ has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __setstate__(self, state):
                        """ Restore state from the unpickled state values.
                        """
                
                        python_path = state['python_path']
                Severity: Minor
                Found in Container.py - About 2 days 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

                Function SelectProp has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
                Open

                    def SelectProp(self, evt):
                        """
                        """
                
                        row, col, pos= evt.GetRow(), evt.GetCol(), evt.GetPosition()
                Severity: Minor
                Found in PropertiesGridCtrl.py - About 1 day 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 Utilities.py has 783 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # -*- coding: utf-8 -*-
                
                ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
                # Utilities.py ---
                #                    --------------------------------
                Severity: Major
                Found in Utilities.py - About 1 day to fix

                  File DSV.py has 769 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # -*- coding: utf-8 -*-
                  """
                  DSV.py - Cliff Wells, 2002
                    Import/export DSV (delimiter separated values, a generalization of CSV).
                  
                  
                  Severity: Major
                  Found in DSV.py - About 1 day to fix

                    File PropertiesGridCtrl.py has 767 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # -*- coding: utf-8 -*-
                    
                    ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
                    # PropertiesGridCtrl.py ---
                    #                     --------------------------------
                    Severity: Major
                    Found in PropertiesGridCtrl.py - About 1 day to fix

                      File LibraryTree.py has 760 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # -*- coding: utf-8 -*-
                      
                      ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
                      # LibraryTree.py ---
                      #                     --------------------------------
                      Severity: Major
                      Found in LibraryTree.py - About 1 day to fix

                        MainApplication has 87 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class MainApplication(wx.Frame):
                            """ DEVSimPy main application.
                            """
                        
                            def __init__(self, parent, id, title):
                        Severity: Major
                        Found in devsimpy.py - About 1 day to fix

                          Function makeDEVSInstance has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def makeDEVSInstance(diagram = None):
                                  """ Return the DEVS instance of diagram. Iterations order is very important!
                                          1. we make the codeblock devs instance
                                          2. we make the devs port instance for all devsimpy port
                                          3. we make Containerblock instance
                          Severity: Minor
                          Found in Container.py - About 1 day 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

                          Function massAtomicTransitions has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def massAtomicTransitions(self, trans, clock):
                                  """
                                  AtomicDEVS function to perform all necessary transitions, does so on a collection of models for performance.
                          
                                  :param trans: iterable containing all models and their requested transition
                          Severity: Minor
                          Found in DEVSKernel/PyPDEVS/pypdevs221/src/solver.py - About 1 day 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

                          Severity
                          Category
                          Status
                          Source
                          Language