freqtrade/freqtrade

View on GitHub

Showing 516 of 516 total issues

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

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

                  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 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_ui_download_url has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def get_ui_download_url(version: Optional[str] = None) -> Tuple[str, str]:
                          base_url = "https://api.github.com/repos/freqtrade/frequi/"
                          # Get base UI Repo path
                      
                          resp = requests.get(f"{base_url}releases", timeout=req_timeout)
                      Severity: Minor
                      Found in freqtrade/commands/deploy_commands.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 clean_ohlcv_dataframe has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def clean_ohlcv_dataframe(
                      Severity: Minor
                      Found in freqtrade/data/converter/converter.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 _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 _validate_pairdata has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

                            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 ohlcv_to_dataframe has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def ohlcv_to_dataframe(
                              Severity: Minor
                              Found in freqtrade/data/converter/converter.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 refresh_latest_ohlcv has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

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