cwru-pat/macro_lightning

View on GitHub

Showing 8 of 8 total issues

File plot.py has 734 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

"""Plotting Functions.

.. todo
Severity: Major
Found in macro_lightning/plot.py - About 1 day to fix

    File physics.py has 395 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    
    """Physics Functions."""
    
    
    
    Severity: Minor
    Found in macro_lightning/physics.py - About 5 hrs to fix

      Function constraints_plot has 16 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def constraints_plot(
      Severity: Major
      Found in macro_lightning/plot.py - About 2 hrs to fix

        Function calculate_Mx_and_Sx has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def calculate_Mx_and_Sx(
        Severity: Major
        Found in macro_lightning/physics.py - About 1 hr to fix

          Function constraints_plot has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def constraints_plot(
              m_arr: T.Sequence,
              sigmin: float = 1e-15,
              sigmax: float = 1e25,
              *,
          Severity: Minor
          Found in macro_lightning/plot.py - About 1 hr 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 calculate_Sx has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def calculate_Sx(
          Severity: Major
          Found in macro_lightning/physics.py - About 1 hr to fix

            Function calculate_Sx has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            def calculate_Sx(
                vels,
                vesc,
                vhold,
                vcirc,
            Severity: Minor
            Found in macro_lightning/physics.py - About 55 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 calculate_Mx has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def calculate_Mx(vels, vvir, vesc, vcirc, vmin, Arho, m_unit=u.g):
            Severity: Major
            Found in macro_lightning/physics.py - About 50 mins to fix
              Severity
              Category
              Status
              Source
              Language