monarch-initiative/N2V

View on GitHub

Showing 369 of 369 total issues

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

    def __init__(

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

        def __init__(

      File tensorflow_embedder.py has 260 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Abstract Keras Model wrapper for embedding models."""
      from typing import Dict, Sequence, Tuple, Any
      
      import numpy as np
      import pandas as pd
      Severity: Minor
      Found in embiggen/embedders/tensorflow_embedders/tensorflow_embedder.py - About 2 hrs to fix

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

            def __init__(

          Function plot_node_ontologies has 17 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def plot_node_ontologies(
          Severity: Major
          Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

            Function plot_approximated_closeness_centrality has 17 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def plot_approximated_closeness_centrality(
            Severity: Major
            Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

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

                  def __init__(

                Function plot_node_squares has 17 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def plot_node_squares(
                Severity: Major
                Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

                  Function plot_node_degrees has 17 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def plot_node_degrees(
                  Severity: Major
                  Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

                    Function plot_approximated_harmonic_centrality has 17 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def plot_approximated_harmonic_centrality(
                    Severity: Major
                    Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

                      Function plot_node_triangles has 17 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def plot_node_triangles(
                      Severity: Major
                      Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

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

                            def __init__(

                          Function transform has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def transform(
                                  self,
                                  graph: Union[Graph, np.ndarray, List[List[str]], List[List[int]]],
                                  node_types: Optional[
                                      Union[Graph, List[Optional[List[str]]], List[Optional[List[int]]]]
                          Severity: Minor
                          Found in embiggen/embedding_transformers/graph_transformer.py - About 2 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 transform has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def transform(
                                  self,
                                  graph: Graph,
                                  edge_features: Optional[Union[np.ndarray, List[np.ndarray]]] = None,
                                  behaviour_for_unknown_edge_labels: Optional[str] = None,
                          Severity: Minor
                          Found in embiggen/embedding_transformers/edge_label_prediction_transformer.py - About 2 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 _plot_positive_and_negative_edges_metric has 16 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _plot_positive_and_negative_edges_metric(
                          Severity: Major
                          Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

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

                                def __init__(
                            Severity: Major
                            Found in embiggen/embedders/ensmallen_embedders/deepwalk_glove.py - About 2 hrs to fix

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

                                  def __init__(

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

                                    def __init__(

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

                                      def plot_edge_types(
                                  Severity: Major
                                  Found in embiggen/visualizations/graph_visualizer.py - About 2 hrs to fix

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

                                        def _prepare_evaluation(
                                    Severity: Major
                                    Found in embiggen/edge_prediction/edge_prediction_model.py - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language