From 764d54b81accfd1d37d2dc099b54d768db6ff573 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:31:37 +0000 Subject: [PATCH 1/2] Bump black from 23.10.1 to 24.3.0 Bumps [black](https://github.com/psf/black) from 23.10.1 to 24.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.10.1...24.3.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 0090bf6..c845ae6 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ -black==23.10.1 +black==24.3.0 mypy==1.8.0 pytest==7.4.3 pytest-mypy-plugins==3.0.0 From fdc19e5df064182c5ce6ddd7db6a2ec7a754602c Mon Sep 17 00:00:00 2001 From: Maurice Berk Date: Sat, 27 Apr 2024 07:11:04 +0100 Subject: [PATCH 2/2] Apply black formatting --- python/shin/__init__.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/python/shin/__init__.py b/python/shin/__init__.py index 083627a..1bfa175 100644 --- a/python/shin/__init__.py +++ b/python/shin/__init__.py @@ -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"] @@ -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 @@ -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 @@ -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 @@ -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(