freqtrade/freqtrade

View on GitHub
freqtrade/strategy/parameters.py

Summary

Maintainability
C
1 day
Test Coverage

File parameters.py has 257 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""
IHyperStrategy interface, hyperoptable Parameter class.
This module defines a base class for auto-hyperoptable strategies.
"""
import logging
Severity: Minor
Found in freqtrade/strategy/parameters.py - About 2 hrs to fix

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

        def __init__(self, low: Union[float, Sequence[float]], high: Optional[float] = None, *,
    Severity: Major
    Found in freqtrade/strategy/parameters.py - About 1 hr to fix

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

          def __init__(self, low: Union[float, Sequence[float]], high: Optional[float] = None, *,
      Severity: Major
      Found in freqtrade/strategy/parameters.py - About 1 hr to fix

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

            def __init__(self, low: Union[float_or_int, Sequence[float_or_int]],
        Severity: Major
        Found in freqtrade/strategy/parameters.py - About 1 hr to fix

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

              def __init__(self, low: Union[int, Sequence[int]], high: Optional[int] = None, *, default: int,
          Severity: Major
          Found in freqtrade/strategy/parameters.py - About 1 hr to fix

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

                def __init__(self, categories: Sequence[Any], *, default: Optional[Any] = None,
            Severity: Major
            Found in freqtrade/strategy/parameters.py - About 50 mins to fix

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

                  def __init__(self, *, default: Any, space: Optional[str] = None,
              Severity: Minor
              Found in freqtrade/strategy/parameters.py - About 45 mins to fix

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

                    def __init__(self, *, default: Optional[Any] = None,
                Severity: Minor
                Found in freqtrade/strategy/parameters.py - About 45 mins to fix

                  Function __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def __init__(self, low: Union[float_or_int, Sequence[float_or_int]],
                                   high: Optional[float_or_int] = None, *, default: float_or_int,
                                   space: Optional[str] = None, optimize: bool = True, load: bool = True, **kwargs):
                          """
                          Initialize hyperopt-optimizable numeric parameter.
                  Severity: Minor
                  Found in freqtrade/strategy/parameters.py - About 25 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

                  There are no issues that match your filters.

                  Category
                  Status