WenjieDu/PyPOTS

View on GitHub

Showing 376 of 433 total issues

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

    def forward(
Severity: Major
Found in pypots/nn/modules/reformer/lsh_attention.py - About 50 mins to fix

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

        def __init__(
    Severity: Major
    Found in pypots/clustering/vader/core.py - About 50 mins to fix

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

          def __init__(
      Severity: Major
      Found in pypots/nn/modules/film/layers.py - About 50 mins to fix

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

            def __init__(
        Severity: Major
        Found in pypots/nn/modules/reformer/layers.py - About 50 mins to fix

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

          def plot_data(
          Severity: Major
          Found in pypots/utils/visual/data.py - About 50 mins to fix

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

                def forward(
            Severity: Major
            Found in pypots/nn/modules/reformer/lsh_attention.py - About 50 mins to fix

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

                  def forward(self, q, k, v, mask=None, input_mask=None, attn_bias=None, window_size=None):
              Severity: Major
              Found in pypots/nn/modules/reformer/local_attention.py - About 50 mins to fix

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

                    def __init__(
                Severity: Major
                Found in pypots/imputation/dlinear/core.py - About 50 mins to fix

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

                      def __init__(
                  Severity: Minor
                  Found in pypots/optim/adamw.py - About 45 mins to fix

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

                        def __init__(self, seq_len, pred_len, top_k, d_model, d_ffn, num_kernels):
                    Severity: Minor
                    Found in pypots/nn/modules/timesnet/layers.py - About 45 mins to fix

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

                          def __init__(
                      Severity: Minor
                      Found in pypots/nn/modules/patchtst/layers.py - About 45 mins to fix

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

                            def __init__(self, k, alpha, c=1, nl=1, initializer=None, **kwargs):
                        Severity: Minor
                        Found in pypots/nn/modules/fedformer/layers.py - About 45 mins to fix

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

                              def _update_context(self, context_in, V, scores, index, L_Q, attn_mask):
                          Severity: Minor
                          Found in pypots/nn/modules/informer/layers.py - About 45 mins to fix

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

                                def __init__(
                            Severity: Minor
                            Found in pypots/nn/modules/informer/layers.py - About 45 mins to fix

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

                              def sample_factor_u(tau_sparse_tensor, tau_ind, U, V, X, beta0=1):
                              Severity: Minor
                              Found in pypots/forecasting/bttf/submodules.py - About 45 mins to fix

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

                                    def __init__(
                                Severity: Minor
                                Found in pypots/nn/modules/imputeformer/attention.py - About 45 mins to fix

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

                                      def __init__(self, B, H, L, index, scores, device="cpu"):
                                  Severity: Minor
                                  Found in pypots/nn/modules/informer/layers.py - About 45 mins to fix

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

                                        def __init__(
                                    Severity: Minor
                                    Found in pypots/optim/adam.py - About 45 mins to fix

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

                                          def __init__(
                                      Severity: Minor
                                      Found in pypots/nn/modules/micn/layers.py - About 45 mins to fix

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

                                        def _BTTF(
                                            dense_tensor,
                                            sparse_tensor,
                                            init,
                                            rank,
                                        Severity: Minor
                                        Found in pypots/forecasting/bttf/core.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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language