Skip to content

Commit

Permalink
Apply black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mberk committed Apr 27, 2024
1 parent 764d54b commit fdc19e5
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions python/shin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,16 @@ class ShinOptimisationDetails(Generic[OutputT]):
z: float

@overload
def __getitem__(self, key: Literal["implied_probabilities"]) -> OutputT:
...
def __getitem__(self, key: Literal["implied_probabilities"]) -> OutputT: ...

@overload
def __getitem__(self, key: Literal["iterations"]) -> float:
...
def __getitem__(self, key: Literal["iterations"]) -> float: ...

@overload
def __getitem__(self, key: Literal["delta"]) -> float:
...
def __getitem__(self, key: Literal["delta"]) -> float: ...

@overload
def __getitem__(self, key: Literal["z"]) -> float:
...
def __getitem__(self, key: Literal["z"]) -> float: ...

def __getitem__(
self, key: Literal["implied_probabilities", "iterations", "delta", "z"]
Expand All @@ -76,8 +72,7 @@ def calculate_implied_probabilities(
convergence_threshold: float = ...,
full_output: Literal[False] = False,
force_python_optimiser: bool = ...,
) -> list[float]:
...
) -> list[float]: ...


# mapping, full output False
Expand All @@ -89,8 +84,7 @@ def calculate_implied_probabilities(
convergence_threshold: float = ...,
full_output: Literal[False] = False,
force_python_optimiser: bool = ...,
) -> dict[T, float]:
...
) -> dict[T, float]: ...


# sequence, full output True
Expand All @@ -102,8 +96,7 @@ def calculate_implied_probabilities(
convergence_threshold: float = ...,
full_output: Literal[True],
force_python_optimiser: bool = ...,
) -> ShinOptimisationDetails[list[float]]:
...
) -> ShinOptimisationDetails[list[float]]: ...


# mapping, full output True
Expand All @@ -115,8 +108,7 @@ def calculate_implied_probabilities(
convergence_threshold: float = ...,
full_output: Literal[True],
force_python_optimiser: bool = ...,
) -> ShinOptimisationDetails[dict[T, float]]:
...
) -> ShinOptimisationDetails[dict[T, float]]: ...


def calculate_implied_probabilities(
Expand Down

0 comments on commit fdc19e5

Please sign in to comment.