From ca03a5e85fbd9bf1d531a24363f6838ae82547d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:50:49 +0000 Subject: [PATCH 1/2] Update mypy requirement from ~=1.6.0 to ~=1.7.0 Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2eb050e31..a2f239f81 100644 --- a/requirements.txt +++ b/requirements.txt @@ -52,7 +52,7 @@ matplotlib~=3.8.0 matplotlib-inline~=0.1.6 mistune~=3.0.1 numpy~=1.26.0 -mypy~=1.6.0 +mypy~=1.7.0 mypy-extensions~=1.0.0 nbclient~=0.8.0 nbsphinx==0.9.1 From d4a580007cd8a37070f1b7ae9568624f7232175b Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Fri, 10 Nov 2023 18:55:21 +0100 Subject: [PATCH 2/2] adapt for mypy 1.7.0 --- broadbean/plotting.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/broadbean/plotting.py b/broadbean/plotting.py index 0ebed6900..e6bb80e20 100644 --- a/broadbean/plotting.py +++ b/broadbean/plotting.py @@ -25,8 +25,7 @@ def getSIScalingAndPrefix(minmax: tuple[float, float]) -> tuple[float, str]: string. """ - # due to https://github.com/python/mypy/issues/6697 - v_max: float = max(map(abs, minmax)) # type: ignore[arg-type, type-var, assignment] + v_max: float = max(map(abs, minmax)) if v_max == 0: v_max = 1 exponent = np.log10(v_max)