meffmadd/pandas-visual-analysis

View on GitHub

Showing 21 of 21 total issues

Function __init__ has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(
        self,
        df: DataFrame,
        categorical_columns: typing.Union[typing.List[str], None] = None,
        sample: typing.Union[float, int, None] = None,
Severity: Minor
Found in src/pandas_visual_analysis/data_source.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 __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(
Severity: Major
Found in src/pandas_visual_analysis/visual_analysis.py - About 1 hr to fix

    Function validate_row_height has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def validate_row_height(row_height, layout, name="row_height"):
        if not (isinstance(row_height, (int, list))):
            raise TypeError(
                "The value for %s has to be an integer or list of integers." % name
            )
    Severity: Minor
    Found in src/pandas_visual_analysis/utils/validation.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 __init__ has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(
            self,
            data: typing.Union[DataFrame, DataSource],
            layout: typing.Union[str, typing.List[typing.List[str]]] = "default",
            categorical_columns: typing.Union[typing.List[str], None] = None,
    Severity: Minor
    Found in src/pandas_visual_analysis/visual_analysis.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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(
    Severity: Major
    Found in src/pandas_visual_analysis/widgets/base_widget.py - About 50 mins to fix

      Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(
              self,
              layout: typing.Union[str, typing.List[typing.List[str]]],
              row_height: typing.Union[int, typing.List[int]],
              data_source: DataSource,
      Severity: Minor
      Found in src/pandas_visual_analysis/layout.py - About 45 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 validate_color has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      def validate_color(color):
          if isinstance(color, str):
              color = hex_to_rgb(color)
          elif isinstance(color, tuple):
              if len(color) != 3:
      Severity: Minor
      Found in src/pandas_visual_analysis/utils/validation.py - About 45 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 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(
      Severity: Minor
      Found in src/pandas_visual_analysis/data_source.py - About 45 mins to fix

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

            def __init__(
        Severity: Minor
        Found in src/pandas_visual_analysis/widgets/histogram.py - About 35 mins to fix

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

              def __init__(
          Severity: Minor
          Found in src/pandas_visual_analysis/widgets/scatter.py - About 35 mins to fix

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

                def __init__(
            Severity: Minor
            Found in src/pandas_visual_analysis/widgets/parcats.py - About 35 mins to fix

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

                  def __init__(
              Severity: Minor
              Found in src/pandas_visual_analysis/layout.py - About 35 mins to fix

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

                    def __init__(
                Severity: Minor
                Found in src/pandas_visual_analysis/widgets/brush_summary.py - About 35 mins to fix

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

                      def __init__(
                  Severity: Minor
                  Found in src/pandas_visual_analysis/widgets/boxplot.py - About 35 mins to fix

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

                        def __init__(
                    Severity: Minor
                    Found in src/pandas_visual_analysis/widgets/parcoords.py - About 35 mins to fix

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

                          def _redraw_plot(self, axis=None):
                              if axis is None:  # fix warning: default argument is mutable
                                  axis = ["x", "y", "size"]
                              with self.figure_widget.batch_update():
                                  if "x" in axis:
                      Severity: Minor
                      Found in src/pandas_visual_analysis/widgets/scatter.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 validate_seed has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def validate_seed(seed):
                          if isinstance(seed, int) or seed is None:
                              if isinstance(seed, int) and (seed < 0 or seed > (2 ** 32 - 1)):
                                  raise ValueError(
                                      "The seed has to be an integer between 0 and 2**32 - 1. Invalid value: %d"
                      Severity: Minor
                      Found in src/pandas_visual_analysis/utils/validation.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, df, columns, categorical_columns):
                              self._df = df
                              self.columns = columns
                              if isinstance(categorical_columns, list):
                                  if not set(categorical_columns).issubset(set(self.columns)):
                      Severity: Minor
                      Found in src/pandas_visual_analysis/utils/column_store.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 _check_categorical_plots has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _check_categorical_plots(self) -> typing.List[str]:
                              """
                              Checks if the layout contains widgets that can only display categorical data.
                      
                              :return: Set of widgets in the layout that are strictly categorical. Empty set otherwise.
                      Severity: Minor
                      Found in src/pandas_visual_analysis/visual_analysis.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 build has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def build(self) -> widgets.Widget:
                              """
                              Generates widgets from layout and returns the root widget for this layout.
                              Rows are in a VBox while plots in the rows are in HBox widgets.
                      
                      
                      Severity: Minor
                      Found in src/pandas_visual_analysis/layout.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