piccolbo/altair_recipes

View on GitHub

Showing 16 of 16 total issues

Function autoplot has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
Open

def autoplot(data=None, columns=None, group_by=None, height=600, width=800):
    """Automatically choose and produce a statistical graphics based on up to three columns of data."""

    assert group_by is None, "long data not supported yet"
    vars_n = len(columns)
Severity: Minor
Found in altair_recipes/autoplot.py - About 6 hrs 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 autoplot has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def autoplot(data=None, columns=None, group_by=None, height=600, width=800):
    """Automatically choose and produce a statistical graphics based on up to three columns of data."""

    assert group_by is None, "long data not supported yet"
    vars_n = len(columns)
Severity: Minor
Found in altair_recipes/autoplot.py - About 1 hr to fix

    Function scatterplot has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def scatterplot(
    Severity: Major
    Found in altair_recipes/scatterplot.py - About 1 hr to fix

      Function multiscatterplot has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def multiscatterplot(
      Severity: Major
      Found in altair_recipes/scatterplot.py - About 1 hr to fix

        Function heatmap has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def heatmap(
        Severity: Major
        Found in altair_recipes/heatmap.py - About 1 hr to fix

          Function areaplot has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def areaplot(
          Severity: Major
          Found in altair_recipes/areaplot.py - About 50 mins to fix

            Function stripplot has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def stripplot(
            Severity: Major
            Found in altair_recipes/stripplot.py - About 50 mins to fix

              Function smoother has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def smoother(
              Severity: Major
              Found in altair_recipes/smoother.py - About 50 mins to fix

                Function barchart has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def barchart(data=None, x=0, y=1, color=False, height=600, width=800):
                Severity: Minor
                Found in altair_recipes/barchart.py - About 45 mins to fix

                  Function boxplot has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def boxplot(data=None, columns=None, group_by=None, color=False, height=600, width=800):
                  Severity: Minor
                  Found in altair_recipes/boxplot.py - About 45 mins to fix

                    Function lineplot has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def lineplot(data=None, x=0, y=1, color=None, height=600, width=800):
                    Severity: Minor
                    Found in altair_recipes/lineplot.py - About 45 mins to fix

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

                      def autocorrelation(data=None, column=0, max_lag=None, height=600, width=800):
                      Severity: Minor
                      Found in altair_recipes/autocorrelation.py - About 35 mins to fix

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

                        def layered_histogram(data=None, columns=None, group_by=None, height=600, width=800):
                        Severity: Minor
                        Found in altair_recipes/histogram.py - About 35 mins to fix

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

                          def qqplot(data=None, x=0, y=1, height=600, width=800):
                          Severity: Minor
                          Found in altair_recipes/qqplot.py - About 35 mins to fix

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

                            def autoplot(data=None, columns=None, group_by=None, height=600, width=800):
                            Severity: Minor
                            Found in altair_recipes/autoplot.py - About 35 mins to fix

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

                              def scatterplot(
                                  data=None, x=0, y=1, color=None, opacity=1, tooltip=None, height=600, width=800
                              ):
                                  """Generate a scatterplot."""
                                  if color is not None:
                              Severity: Minor
                              Found in altair_recipes/scatterplot.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

                              Severity
                              Category
                              Status
                              Source
                              Language