DogsTailFarmer/martin-binance

View on GitHub

Showing 15 of 17 total issues

File strategy_base.py has 1608 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""
martin-binance base class and methods definitions
"""
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
Severity: Major
Found in martin_binance/strategy_base.py - About 4 days to fix

    File lib.py has 403 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """
    martin-binance classes and methods definitions
    """
    __author__ = "Jerry Fedorenko"
    __copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
    Severity: Minor
    Found in martin_binance/lib.py - About 5 hrs to fix

      File exchange_simulator.py has 313 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #!/usr/bin/env python3
      # -*- coding: utf-8 -*-
      """
      Simple exchange simulator for backtest purpose
      """
      Severity: Minor
      Found in martin_binance/backtest/exchange_simulator.py - About 3 hrs to fix

        File funds_rate_exporter.py has 262 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python3
        # -*- coding: utf-8 -*-
        ####################################################################
        # Config for prometheus_client
        # See README.md for detail
        Severity: Minor
        Found in martin_binance/service/funds_rate_exporter.py - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (self.shift_grid_threshold and self.last_shift_time and self.get_time() -
                          self.last_shift_time > SHIFT_GRID_DELAY
                      and ((self.cycle_buy and ticker.last_price >= self.shift_grid_threshold)
                           or
                           (not self.cycle_buy and ticker.last_price <= self.shift_grid_threshold))):
          Severity: Major
          Found in martin_binance/executor.py - About 1 hr to fix

            Avoid too many return statements within this function.
            Open

                    return '4h'
            Severity: Major
            Found in martin_binance/lib.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return '1h'
              Severity: Major
              Found in martin_binance/lib.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return '12h'
                Severity: Major
                Found in martin_binance/lib.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return '6h'
                  Severity: Major
                  Found in martin_binance/lib.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return '1d'
                    Severity: Major
                    Found in martin_binance/lib.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return '30m'
                      Severity: Major
                      Found in martin_binance/lib.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return '3d'
                        Severity: Major
                        Found in martin_binance/lib.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return '2h'
                          Severity: Major
                          Found in martin_binance/lib.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return '1w' if 10080 <= m < 44640 else '1m'
                            Severity: Major
                            Found in martin_binance/lib.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return '8h'
                              Severity: Major
                              Found in martin_binance/lib.py - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language