freqtrade/freqtrade

View on GitHub

Showing 515 of 517 total issues

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

    def check_exit_timeout(
Severity: Minor
Found in freqtrade/strategy/interface.py - About 45 mins to fix

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

        def shutdown(self):
            """
            Shutdown the loop, thread, and tasks
            """
            if self._thread and self._loop:
    Severity: Minor
    Found in freqtrade/rpc/external_message_consumer.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 _convert_dataframe_to_dict has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

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

          def check_entry_timeout(
      Severity: Minor
      Found in freqtrade/strategy/interface.py - About 45 mins to fix

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

            def populate_any_indicators(
        Severity: Minor
        Found in freqtrade/strategy/interface.py - About 45 mins to fix

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

          def informative(
          Severity: Minor
          Found in freqtrade/strategy/informative_decorator.py - About 45 mins to fix

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

                def order_filled(
            Severity: Minor
            Found in freqtrade/strategy/interface.py - About 45 mins to fix

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

              def file_dump_json(filename: Path, data: Any, is_zip: bool = False, log: bool = True) -> None:
                  """
                  Dump JSON data into a file
                  :param filename: file to create
                  :param is_zip: if file should be zip
              Severity: Minor
              Found in freqtrade/misc.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 update has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def update(self, require_update: bool = True) -> None:
                      """
                      Updates wallets from the configured version.
                      By default, updates from the exchange.
                      Update-skipping should only be used for user-invoked /balance calls, since
              Severity: Minor
              Found in freqtrade/wallets.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 generate_profit_graph has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def generate_profit_graph(
              Severity: Minor
              Found in freqtrade/plot/plotting.py - About 45 mins to fix

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

                    def __init__(
                Severity: Minor
                Found in freqtrade/strategy/parameters.py - About 45 mins to fix

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

                      def check_buy_timeout(
                  Severity: Minor
                  Found in freqtrade/strategy/interface.py - About 45 mins to fix

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

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

                          def _exit_trade(
                      Severity: Minor
                      Found in freqtrade/optimize/backtesting.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 after_iteration has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def after_iteration(
                                  self, model, epoch: int, evals_log: callback.TrainingCallback.EvalsLog
                              ) -> bool:
                                  if not self.activate:
                                      return False
                          Severity: Minor
                          Found in freqtrade/freqai/tensorboard/tensorboard.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 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

                            Avoid deeply nested control flow statements.
                            Open

                                                    if not self.current_analysis.false_indicators.__contains__(col_name[0]):
                                                        self.current_analysis.false_indicators.append(col_name[0])
                                                        logger.info(
                                                            f"=> found look ahead bias in indicator "
                                                            f"{col_name[0]}. "
                            Severity: Major
                            Found in freqtrade/optimize/analysis/lookahead.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

                              Severity
                              Category
                              Status
                              Source
                              Language