monarch-initiative/N2V

View on GitHub

Showing 369 of 369 total issues

Function __init__ has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def __init__(
        self,
        graph: Union[Graph, str],
        support: Optional[Graph] = None,
        subgraph_of_interest: Optional[Graph] = None,
Severity: Minor
Found in embiggen/visualizations/graph_visualizer.py - About 1 hr to fix

    Function _fit_transform has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def _fit_transform(
            self,
            graph: Graph,
            return_dataframe: bool = True,
        ) -> EmbeddingResult:
    Severity: Minor
    Found in embiggen/embedders/ensmallen_embedders/hope.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 fit has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def fit(
            self,
            node_feature: Optional[Union[pd.DataFrame, np.ndarray, List[Union[pd.DataFrame, np.ndarray]]]] = None,
            node_type_feature: Optional[Union[pd.DataFrame, np.ndarray, List[Union[pd.DataFrame, np.ndarray]]]] = None,
        ):
    Severity: Minor
    Found in embiggen/embedding_transformers/node_transformer.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 fit has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def fit(
            self,
            node_feature: Union[pd.DataFrame, np.ndarray, List[Union[pd.DataFrame, np.ndarray]]],
            node_type_feature: Optional[Union[pd.DataFrame, np.ndarray,
                                              List[Union[pd.DataFrame, np.ndarray]]]] = None,
    Severity: Minor
    Found in embiggen/embedding_transformers/edge_transformer.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 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(
            self,
            graph: Union[Graph, str],
            support: Optional[Graph] = None,
            subgraph_of_interest: Optional[Graph] = None,
    Severity: Minor
    Found in embiggen/visualizations/graph_visualizer.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 plot_nodes has 15 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def plot_nodes(
    Severity: Major
    Found in embiggen/visualizations/graph_visualizer.py - About 1 hr to fix

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

          def __init__(
      Severity: Major
      Found in embiggen/embedders/tensorflow_embedders/siamese.py - About 1 hr to fix

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

            def __init__(
        Severity: Major
        Found in embiggen/embedders/pytorch_geometric/node2vec.py - About 1 hr to fix

          Function plot_positive_and_negative_edges_euclidean_distance has 15 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def plot_positive_and_negative_edges_euclidean_distance(
          Severity: Major
          Found in embiggen/visualizations/graph_visualizer.py - About 1 hr to fix

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

                def __init__(

              Function plot_positive_and_negative_edges_cosine_similarity has 15 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def plot_positive_and_negative_edges_cosine_similarity(
              Severity: Major
              Found in embiggen/visualizations/graph_visualizer.py - About 1 hr to fix

                Function __iterate_negative_graphs has 15 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __iterate_negative_graphs(
                Severity: Major
                Found in embiggen/edge_prediction/edge_prediction_model.py - About 1 hr to fix

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

                      def __init__(

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

                        def __init__(
                    Severity: Major
                    Found in embiggen/embedders/pecanpy_embedders/node2vec.py - About 1 hr to fix

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

                          def __init__(

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

                            def __init__(

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

                              def __init__(

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

                                def transform(
                                    self,
                                    positive_graph: Union[Graph, np.ndarray, List[List[str]], List[List[int]]],
                                    negative_graph: Union[Graph, np.ndarray, List[List[str]], List[List[int]]],
                                    edge_features: Optional[Union[np.ndarray, List[np.ndarray]]] = None,
                            Severity: Minor
                            Found in embiggen/embedding_transformers/edge_prediction_transformer.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 14 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(

                              Function predict_proba_bipartite_graph_from_edge_node_prefixes has 14 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def predict_proba_bipartite_graph_from_edge_node_prefixes(
                              Severity: Major
                              Found in embiggen/edge_prediction/edge_prediction_model.py - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language