monarch-initiative/N2V

View on GitHub

Showing 369 of 369 total issues

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

    def _predict_proba(
        self,
        graph: Graph,
        support: Optional[Graph] = None,
        node_features: Optional[List[np.ndarray]] = None,

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 _get_model_training_input has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def _get_model_training_input(
Severity: Minor
Found in embiggen/node_label_prediction/node_label_prediction_tensorflow/gcn.py - About 45 mins to fix

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

        def __init__(

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

          def _fit(

        Consider simplifying this complex logical expression.
        Open

                if (
                    len(features) == 0
                    and not self._use_node_embedding
                    and not self._use_edge_type_embedding
                    and len(edge_features) == 0
        Severity: Major
        Found in embiggen/utils/abstract_edge_gcn.py - About 40 mins to fix

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

              def __init__(
          Severity: Minor
          Found in embiggen/embedders/karateclub_embedders/randne.py - About 35 mins to fix

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

                def _get_positive_edges_embedding(
            Severity: Minor
            Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                  def __init__(
              Severity: Minor
              Found in embiggen/embedders/ensmallen_embedders/weighted_spine.py - About 35 mins to fix

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

                    def _build_output(
                Severity: Minor
                Found in embiggen/embedders/tensorflow_embedders/transe.py - About 35 mins to fix

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

                      def plot_positive_and_negative_adamic_adar_histogram(
                  Severity: Minor
                  Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                        def plot_positive_and_negative_resource_allocation_index_histogram(
                    Severity: Minor
                    Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                          def plot_positive_and_negative_preferential_attachment_histogram(
                      Severity: Minor
                      Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                            def __init__(
                        Severity: Minor
                        Found in embiggen/embedders/ensmallen_embedders/node2vec.py - About 35 mins to fix

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

                              def _build_output(
                          Severity: Minor
                          Found in embiggen/embedders/tensorflow_embedders/structured_embedding.py - About 35 mins to fix

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

                                def _build_output(
                            Severity: Minor
                            Found in embiggen/embedders/tensorflow_embedders/siamese.py - About 35 mins to fix

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

                                  def _set_legend(
                              Severity: Minor
                              Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                                    def fit_negative_and_positive_edges(
                                Severity: Minor
                                Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                                      def fit_edges(
                                  Severity: Minor
                                  Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                                        def plot_edge_segments(
                                    Severity: Minor
                                    Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix

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

                                          def _get_negative_edge_embedding(
                                      Severity: Minor
                                      Found in embiggen/visualizations/graph_visualizer.py - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language