Test Failed
Push — master ( 63ff63...fafd44 )
by Francisco Manzano
08:52
created

econopy.rents.actualizacion   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 4

3 Functions

Rating   Name   Duplication   Size   Complexity  
A actualizar_renta_perpetua() 0 2 1
A actualizar_renta() 0 5 2
A actualizar_cantidad() 0 2 1
1
"""Actualizaciones financieras.
2
    Traer una cantidad de dinero del futuro a un tipo de interes dado."""
3
4
5
def actualizar_cantidad(amount, rate, pediods):
0 ignored issues
show
Coding Style introduced by
This function should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
6
    return amount / (1 + rate)**pediods
7
8
9
def actualizar_renta(installment, rate, periods):
0 ignored issues
show
Coding Style introduced by
This function should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
10
    amount = 0
11
    for i in range(1, periods+1):
12
        amount += actualizar_cantidad(installment, rate, i)
13
    return amount
14
15
16
def actualizar_renta_perpetua(installment, rate):
0 ignored issues
show
Coding Style introduced by
This function should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
17
    return installment / rate
18