freqtrade/freqtrade

View on GitHub

Showing 515 of 517 total issues

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 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_sortino.py - About 45 mins to fix

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

                def fit(self, data_dictionary: Dict[str, Any], dk: FreqaiDataKitchen, **kwargs):
                    """
                    User customizable fit method
                    :param data_dictionary: dict = common data dictionary containing all train/test
                        features/labels/weights.
            Severity: Minor
            Found in freqtrade/freqai/prediction_models/ReinforcementLearner.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 _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

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

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

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

                                  def get_analyzed_dataframe(self, pair: str, timeframe: str) -> Tuple[DataFrame, datetime]:
                                      """
                                      Retrieve the analyzed dataframe. Returns the full dataframe in trade mode (live / dry),
                                      and the last 1000 candles (up to the time evaluated at this moment) in all other modes.
                                      :param pair: pair to get the data for
                              Severity: Minor
                              Found in freqtrade/data/dataprovider.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 _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
                                Severity
                                Category
                                Status
                                Source
                                Language