sonntagsgesicht/dcf

View on GitHub
dcf/cashflows/contingent.py

Summary

Maintainability
B
5 hrs
Test Coverage

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

    def __init__(self, payment_date_list, amount_list=DEFAULT_AMOUNT,
Severity: Major
Found in dcf/cashflows/contingent.py - About 1 hr to fix

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

        def __init__(self, payment_date_list,
    Severity: Major
    Found in dcf/cashflows/contingent.py - About 1 hr to fix

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

          def __init__(self, payment_date_list, amount_list=DEFAULT_AMOUNT,
      Severity: Major
      Found in dcf/cashflows/contingent.py - About 1 hr to fix

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

            def __init__(self, payment_date_list, amount_list=DEFAULT_AMOUNT,
                         origin=None, day_count=None,
                         fixing_offset=None, pay_offset=None,
                         fixed_rate=0., cap_strike=None, floor_strike=None,
                         payoff_model=None):
        Severity: Minor
        Found in dcf/cashflows/contingent.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 __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(self, payment_date_list, amount_list=DEFAULT_AMOUNT,
                         strike_list=(), is_put_list=False,
                         fixing_offset=None, pay_offset=None,
                         origin=None, payoff_model=None):
                r""" list of European option payoffs
        Severity: Minor
        Found in dcf/cashflows/contingent.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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(self, payment_date_list,
                         call_amount_list=DEFAULT_AMOUNT, call_strike_list=(),
                         put_amount_list=DEFAULT_AMOUNT, put_strike_list=(),
                         fixing_offset=None, pay_offset=None,
                         origin=None, payoff_model=None):
        Severity: Minor
        Found in dcf/cashflows/contingent.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