WenjieDu/PyPOTS

View on GitHub

Showing 398 of 455 total issues

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 _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

    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/nn/modules/imputeformer/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/nn/modules/tide/autoencoder.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/doc.py - About 45 mins to fix

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

                  def __init__(self, self_attention, cross_attention, seg_len, d_model, d_ff=None, dropout=0.1):
              Severity: Minor
              Found in pypots/nn/modules/crossformer/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/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 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

                    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

                      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 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 __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 __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 _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

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

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

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

                                    def fit(
                                Severity: Minor
                                Found in pypots/forecasting/csdi/model.py - About 35 mins to fix

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

                                      def forward(
                                  Severity: Minor
                                  Found in pypots/nn/modules/informer/layers.py - About 35 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language