alchemyst/Skogestad-Python

View on GitHub

Showing 98 of 668 total issues

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

def SVD_w(G, w_start=-2, w_end=2, axlim=None, points=10000):
Severity: Minor
Found in SVD_w.py - About 35 mins to fix

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

    def plot_zeros_poles(z, labels=None, markers='*', markersize=30, markercolor='blue'):
    Severity: Minor
    Found in robustcontrol/utilsplot.py - About 35 mins to fix

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

      def rule_three_four(G, Gd, R=1.1, perfect=True,
      Severity: Minor
      Found in siso_controllability.py - About 35 mins to fix

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

        def mimo_nyquist_plot(L, w_start=-2, w_end=2, axlim=None, points=1000):
        Severity: Minor
        Found in robustcontrol/utilsplot.py - About 35 mins to fix

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

          def condtn_nm_plot(G, w_start=-2, w_end=2, axlim=None, points=1000):
          Severity: Minor
          Found in robustcontrol/utilsplot.py - About 35 mins to fix

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

            def weight_calc(w_start, w_end, li, weight_i, steps):
            Severity: Minor
            Found in Uncertain_MIMO.py - About 35 mins to fix

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

              def weight_calc_dec(w_start, w_end, li, weight_i, steps):
              Severity: Minor
              Found in Uncertain_MIMO.py - About 35 mins to fix

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

                def rule3(G, Gd, message=False, w1=-4, w2=2):
                Severity: Minor
                Found in robustcontrol/Chapter_05.py - About 35 mins to fix

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

                      def subbode(A, text, crossover, labB, labP):
                  Severity: Minor
                  Found in robustcontrol/utilsplot.py - About 35 mins to fix

                    Function polylatex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def polylatex(coefficients, variable='s'):
                        """Return latex representation of a polynomial
                    
                        :param coefficients: iterable of coefficients in descending order
                        :param variable: string containing variable to use
                    Severity: Minor
                    Found in robustcontrol/utils.py - About 35 mins 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 weight_calc has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def weight_calc(w_start, w_end, li, weight_i, steps):
                        """Calculates a simple third-order weight
                        Accommodates situations were the weight increases with frequency
                        """
                    
                    
                    Severity: Minor
                    Found in Uncertain_MIMO.py - About 35 mins 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 __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def __init__(self, *system):
                            N = len(system)
                    
                            if N == 1:  # could be either a utils.tf or utils.mimotf object
                                sys = system[0]
                    Severity: Minor
                    Found in robustcontrol/InternalDelay.py - About 35 mins 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

                    Avoid too many return statements within this function.
                    Open

                                    return G_scaled, Gd_scaled
                    Severity: Major
                    Found in robustcontrol/utils.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return G_scaled[0, 0], Gd_scaled[0, 0]
                      Severity: Major
                      Found in robustcontrol/utils.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return G_scaled[0, 0]
                        Severity: Major
                        Found in robustcontrol/utils.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return G_scaled
                          Severity: Major
                          Found in robustcontrol/utils.py - About 30 mins to fix

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

                            def rule8(G, message=False):
                                """
                                This is rule eight of chapter five
                            
                                This function determines if the plant is open-loop stable at its poles
                            Severity: Minor
                            Found in robustcontrol/Chapter_05.py - About 25 mins 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 lcm_of_all_minors has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def lcm_of_all_minors(G):
                                """
                                Returns the lowest common multiple of all minors of G
                                """
                                Nrows, Ncols = G.shape
                            Severity: Minor
                            Found in robustcontrol/utils.py - About 25 mins 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