WenjieDu/PyPOTS

View on GitHub

Showing 376 of 433 total issues

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

    def __init__(
Severity: Minor
Found in pypots/imputation/stemgnn/data.py - About 35 mins to fix

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

        def __init__(
    Severity: Minor
    Found in pypots/imputation/imputeformer/data.py - About 35 mins to fix

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

          def __init__(
      Severity: Minor
      Found in pypots/imputation/tefn/data.py - About 35 mins to fix

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

            def __init__(
        Severity: Minor
        Found in pypots/imputation/frets/data.py - About 35 mins to fix

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

              def __init__(
          Severity: Minor
          Found in pypots/imputation/autoformer/data.py - About 35 mins to fix

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

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

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

                  def __init__(
              Severity: Minor
              Found in pypots/imputation/moderntcn/data.py - About 35 mins to fix

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

                    def __init__(
                Severity: Minor
                Found in pypots/imputation/koopa/data.py - About 35 mins to fix

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

                      def __init__(
                  Severity: Minor
                  Found in pypots/imputation/reformer/data.py - About 35 mins to fix

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

                        def __init__(
                    Severity: Minor
                    Found in pypots/imputation/tide/data.py - About 35 mins to fix

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

                          def __init__(
                      Severity: Minor
                      Found in pypots/imputation/film/data.py - About 35 mins to fix

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

                            def predict(
                        Severity: Minor
                        Found in pypots/imputation/saits/model.py - About 35 mins to fix

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

                              def __init__(
                          Severity: Minor
                          Found in pypots/imputation/revinscinet/data.py - About 35 mins to fix

                            Function __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __init__(
                                    self,
                                    cell_type: str,
                                    n_layer: int,
                                    d_input: int,
                            Severity: Minor
                            Found in pypots/nn/modules/crli/layers.py - About 35 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 forward has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def forward(self, x_list):
                                    length_list = []
                                    for x in x_list:
                                        _, T, _ = x.size()
                                        length_list.append(T)
                            Severity: Minor
                            Found in pypots/nn/modules/timemixer/layers.py - About 35 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 forward has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def forward(self, x, attn_mask=None):
                                    attns = []
                                    if self.conv_layers is not None:
                                        for attn_layer, conv_layer in zip(self.attn_layers, self.conv_layers):
                                            x, attn = attn_layer(x, attn_mask=attn_mask)
                            Severity: Minor
                            Found in pypots/nn/modules/informer/autoencoder.py - About 35 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 forward has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def forward(
                                    self,
                                    q: torch.Tensor,
                                    k: torch.Tensor,
                                    v: torch.Tensor,
                            Severity: Minor
                            Found in pypots/nn/modules/fedformer/layers.py - About 35 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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __init__(
                                    self,
                                    n_features,
                                    n_layers,
                                    d_model,
                            Severity: Minor
                            Found in pypots/nn/modules/raindrop/backbone.py - About 35 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 run has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def run(self):
                                    """Execute the given command."""
                                    # run checks first
                                    self.checkup()
                            
                            
                            Severity: Minor
                            Found in pypots/cli/doc.py - About 35 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 plot_data has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def plot_data(
                                X: np.ndarray,
                                X_ori: np.ndarray,
                                X_imputed: np.ndarray,
                                sample_idx: Optional[int] = None,
                            Severity: Minor
                            Found in pypots/utils/visual/data.py - About 35 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