freqtrade/freqtrade

View on GitHub

Showing 514 of 516 total issues

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

    def merge_features(
Severity: Minor
Found in freqtrade/freqai/data_kitchen.py - About 45 mins to fix

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

        def _process_exit_order(
    Severity: Minor
    Found in freqtrade/optimize/backtesting.py - About 45 mins to fix

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

          def _params_update_for_json(result_dict, params, non_optimized, space: str) -> None:
              if (space in params) or (space in non_optimized):
                  space_params = HyperoptTools._space_params(params, space)
                  space_non_optimized = HyperoptTools._space_params(non_optimized, space)
                  all_space_params = space_params
      Severity: Minor
      Found in freqtrade/optimize/hyperopt_tools.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 _on_step has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def _on_step(self) -> bool:
              local_info = self.locals["infos"][0]
      
              if hasattr(self.training_env, "envs"):
                  tensorboard_metrics = self.training_env.envs[0].unwrapped.tensorboard_metrics
      Severity: Minor
      Found in freqtrade/freqai/tensorboard/TensorboardCallback.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 append_model_predictions has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def append_model_predictions(
      Severity: Minor
      Found in freqtrade/freqai/data_drawer.py - About 45 mins to fix

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

            def _get_exit_for_signal(
        Severity: Minor
        Found in freqtrade/optimize/backtesting.py - About 45 mins to fix

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

              def make_train_test_datasets(
                  self, filtered_dataframe: DataFrame, labels: DataFrame
              ) -> Dict[Any, Any]:
                  """
                  Given the dataframe for the full history for training, split the data into
          Severity: Minor
          Found in freqtrade/freqai/data_kitchen.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 indicator not in self.dict_recursive:
                                      self.dict_recursive[indicator] = {}
          
          
          Severity: Major
          Found in freqtrade/optimize/analysis/recursive.py - About 45 mins to fix

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

                def _throttle(
            Severity: Minor
            Found in freqtrade/worker.py - About 45 mins to fix

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

                  def hyperopt_loss_function(
              Severity: Minor
              Found in freqtrade/optimize/hyperopt_loss/hyperopt_loss_sharpe.py - About 45 mins to fix

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

                def print_results(
                Severity: Minor
                Found in freqtrade/data/entryexitanalysis.py - About 45 mins to fix

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

                  def _load_cached_data_for_updating(
                  Severity: Minor
                  Found in freqtrade/data/history/history_utils.py - About 45 mins to fix

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

                    def calculate_max_drawdown(
                    Severity: Minor
                    Found in freqtrade/data/metrics.py - About 45 mins to fix

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

                          def adjust(self, pairs: List[str]) -> list:
                              """
                              Filters out and sorts "pairs" according to Edge calculated pairs
                              """
                              final = []
                      Severity: Minor
                      Found in freqtrade/edge/edge_positioning.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 _get_params has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def _get_params(
                      Severity: Minor
                      Found in freqtrade/exchange/exchange.py - About 45 mins to fix

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

                            def update_from_ccxt_object(self, order):
                                """
                                Update Order from ccxt response
                                Only updates if fields are available from ccxt -
                                """
                        Severity: Minor
                        Found in freqtrade/persistence/trade_model.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 _check_empty_df has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def _check_empty_df(
                        Severity: Minor
                        Found in freqtrade/data/history/datahandlers/idatahandler.py - About 45 mins to fix

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

                          def _download_pair_history(
                              pair: str,
                              *,
                              datadir: Path,
                              exchange: Exchange,
                          Severity: Minor
                          Found in freqtrade/data/history/history_utils.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 _build_coroutine has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _build_coroutine(
                          Severity: Minor
                          Found in freqtrade/exchange/exchange.py - About 45 mins to fix

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

                                def _fetch_and_calculate_funding_fees(
                            Severity: Minor
                            Found in freqtrade/exchange/exchange.py - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language