From 83f285c913a0cb27e6ab5854e139a0fe156a8122 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 03:17:35 +0000 Subject: [PATCH 1/3] chore(deps-dev): bump mypy from 1.11.2 to 1.12.1 Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.12.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e3cfc4e48..0028bfc23 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,7 +8,7 @@ coveralls==4.0.1 ruff==0.6.9 -mypy==1.11.2 +mypy==1.12.1 pre-commit==4.0.1 pytest==8.3.3 pytest-asyncio==0.24.0 From 41a4c7c39f8720c2381fc13f8c88c1a74dd723a5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 21 Oct 2024 06:39:55 +0200 Subject: [PATCH 2/3] chore: improve type safety --- freqtrade/data/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/metrics.py b/freqtrade/data/metrics.py index 77f29080c..de8ebac4a 100644 --- a/freqtrade/data/metrics.py +++ b/freqtrade/data/metrics.py @@ -261,8 +261,8 @@ def calculate_expectancy(trades: pd.DataFrame) -> tuple[float, float]: :return: expectancy, expectancy_ratio """ - expectancy = 0 - expectancy_ratio = 100 + expectancy = 0.0 + expectancy_ratio = 100.0 if len(trades) > 0: winning_trades = trades.loc[trades["profit_abs"] > 0] From f100ad12e03f641362d959b991170f378d569977 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 21 Oct 2024 10:18:01 +0200 Subject: [PATCH 3/3] chore: fix whitespace error after merge --- requirements-dev.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 3f08549db..1907e9a0e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,7 +7,6 @@ -r docs/requirements-docs.txt coveralls==4.0.1 - ruff==0.7.0 mypy==1.12.1 pre-commit==4.0.1