Skip to content

Commit

Permalink
Upgrade mypy to the last version supporting Python 3.6
Browse files Browse the repository at this point in the history
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 python/mypy#9275
which was released in mypy 0.940.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
  • Loading branch information
gilles-peskine-arm committed Oct 9, 2024
1 parent 9f85399 commit 1c5a252
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/ci.requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1c5a252

Please sign in to comment.