freqtrade/freqtrade

View on GitHub

Showing 514 of 516 total issues

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

        Avoid deeply nested control flow statements.
        Open

                                if value is None:
                                    continue
                                elif not isinstance(value, ast_comments.AST):
                                    new_values.extend(value)
                                    continue
        Severity: Major
        Found in freqtrade/strategy/strategyupdater.py - About 45 mins to fix

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

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

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

                def _update_dry(self) -> None:
                    """
                    Update from database in dry-run mode
                    - Apply profits of closed trades on top of stake amount
                    - Subtract currently tied up stake_amount in open trades
            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 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 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

                  Avoid deeply nested control flow statements.
                  Open

                                          if not isnan(current_rate):
                                              prof = trade.calculate_profit(current_rate)
                                              current_profit = prof.profit_ratio
                                              current_profit_abs = prof.profit_abs
                                              total_profit_abs = prof.total_profit
                  Severity: Major
                  Found in freqtrade/rpc/rpc.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 _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 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 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_calmar.py - About 45 mins to fix

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

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

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

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

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

                                    def get_result_table(
                                Severity: Minor
                                Found in freqtrade/optimize/hyperopt_tools.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 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
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language