From 199c9195f57f95c54f349d2fa7ee4c777cf3b0b3 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 23 Sep 2024 18:03:10 +0200 Subject: [PATCH] Upgrade mypy to the last version supporting Python 3.6 Upgrade mypy to 0.971, which is the last version that supports Python 3.6 (the oldest Python version that we currently run on the CI). This fixes the error ``` framework/scripts/mbedtls_framework/outcome_analysis.py:119: error: Incompatible return value type (got "IO[Any]", expected "TextIO") framework/scripts/mbedtls_framework/outcome_analysis.py:121: error: Incompatible return value type (got "IO[Any]", expected "TextIO") ``` As far as I can tell the fix is https://github.com/python/mypy/pull/9275 which was released in mypy 0.940. Signed-off-by: Gilles Peskine --- scripts/ci.requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci.requirements.txt b/scripts/ci.requirements.txt index d21aa2798..1ef8abd58 100644 --- a/scripts/ci.requirements.txt +++ b/scripts/ci.requirements.txt @@ -7,9 +7,9 @@ # 2.4.4 is the version in Ubuntu 20.04. It supports Python >=3.5. pylint == 2.4.4 -# Use the earliest version of mypy that works with our code base. -# See https://github.com/Mbed-TLS/mbedtls/pull/3953 . -mypy >= 0.780 +# Use the last version of mypy that is compatible with Python 3.6. +# Newer versions should be ok too. +mypy >= 0.971 # At the time of writing, only needed for tests/scripts/audit-validity-dates.py. # It needs >=35.0.0 for correct operation, and that requires Python >=3.6,