WenjieDu/PyPOTS

View on GitHub

Showing 376 of 433 total issues

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

    def __init__(
Severity: Minor
Found in pypots/nn/modules/crli/backbone.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/usgan/backbone.py - About 45 mins to fix

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

          def calc_loss(self, observed_data, cond_mask, indicating_mask, side_info, is_train, set_t=-1):
      Severity: Minor
      Found in pypots/nn/modules/csdi/backbone.py - About 45 mins to fix

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

            def __init__(self, in_planes, kernel_size, dropout, groups, hidden_size, INN):
        Severity: Minor
        Found in pypots/nn/modules/scinet/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/sgd.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/koopa/layers.py - About 45 mins to fix

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

                  def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, delta=None):
              Severity: Minor
              Found in pypots/nn/modules/informer/layers.py - About 45 mins to fix

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

                def sample_factor_v(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__(self, in_planes, kernel, dropout, groups, hidden_size, INN):
                  Severity: Minor
                  Found in pypots/nn/modules/scinet/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/tide/autoencoder.py - About 45 mins to fix

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

                              def wrapper(self, *args, key_namespace=None, fetch=False, set_cache=True, **kwargs):
                      Severity: Minor
                      Found in pypots/nn/modules/reformer/lsh_attention.py - About 45 mins to fix

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

                            def forward(self, qk, v, query_len=None, input_mask=None, input_attn_mask=None, **kwargs):
                        Severity: Minor
                        Found in pypots/nn/modules/reformer/lsh_attention.py - About 45 mins to fix

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

                              def __init__(
                          Severity: Minor
                          Found in pypots/classification/brits/core.py - About 45 mins to fix

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

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

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

                                  def __init__(
                              Severity: Minor
                              Found in pypots/cli/tuning.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/frets/backbone.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/nonstationary_transformer/layers.py - About 45 mins to fix

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

                                        def forward(
                                            self,
                                            x: Union[Tensor, PairTensor],
                                            p_t: Tensor,
                                            edge_index: Adj,
                                    Severity: Minor
                                    Found in pypots/nn/modules/raindrop/layers.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

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if hasattr(value, "__iter__"):
                                                                value = [datetime.fromtimestamp(ts) for ts in value]
                                                            else:
                                                                value = datetime.fromtimestamp(value)
                                                    datadict[key] = value
                                    Severity: Major
                                    Found in pypots/data/saving/h5.py - About 45 mins to fix

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

                                          def _get_data_sizes(self) -> Tuple[int, ...]:
                                              """Detect the data sample sizes in the dataset and return the numbers.
                                      
                                              Returns
                                              -------
                                      Severity: Minor
                                      Found in pypots/data/dataset/base.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