From bec22fb04cc0f702e77026afb4f7321a93579f57 Mon Sep 17 00:00:00 2001 From: Ali Faraji Date: Mon, 10 Jul 2023 22:34:45 -0400 Subject: [PATCH] refactor: remove the types --- gamekit/__init__.py | 5 +---- gamekit/algorithms/__init__.py | 2 -- gamekit/algorithms/bankruptcy.py | 6 +++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/gamekit/__init__.py b/gamekit/__init__.py index f91309a..5ef5fd0 100644 --- a/gamekit/__init__.py +++ b/gamekit/__init__.py @@ -1,5 +1,2 @@ - - from gamekit.exceptions import * -from gamekit import algorithms -from gamekit.algorithms import * +from gamekit.algorithms import * \ No newline at end of file diff --git a/gamekit/algorithms/__init__.py b/gamekit/algorithms/__init__.py index 0808a46..25df11f 100644 --- a/gamekit/algorithms/__init__.py +++ b/gamekit/algorithms/__init__.py @@ -1,5 +1,3 @@ - - from gamekit.algorithms.bankruptcy import * diff --git a/gamekit/algorithms/bankruptcy.py b/gamekit/algorithms/bankruptcy.py index 20266e0..7efd4bf 100644 --- a/gamekit/algorithms/bankruptcy.py +++ b/gamekit/algorithms/bankruptcy.py @@ -5,7 +5,7 @@ from gamekit import NegativeNumberException -def constrained_equal_awards(claims: list, asset: float) -> tuple[list, float]: +def constrained_equal_awards(claims, asset): """ This function returns a list of allocations based on the constrained equal allocation method. If the asset is larger than the sum of claims, returns the claims list itself. @@ -67,14 +67,14 @@ def constrained_equal_awards(claims: list, asset: float) -> tuple[list, float]: return allocations, r -def CEA(claims: list, asset: float) -> tuple[list, float]: +def CEA(claims, asset): """ equal to the `constrained_equal_awards` function. """ return constrained_equal_awards(claims, asset) -def constrained_equal_losses(claims: list, asset: float) -> tuple[list, float]: +def constrained_equal_losses(claims, asset): """ This function returns a list of allocations based on the constrained equal loss method. If the asset is larger than the sum of claims, returns the claims list itself.