Skip to content

Commit 840ec65

Browse files
committed
ci: update mypy check for python 3.12, check under python 3.8 rules
1 parent 8ed4258 commit 840ec65

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ repos:
103103
name: Check type annotations in python files
104104
entry: tools/ci/check_type_comments.py
105105
additional_dependencies:
106-
- 'mypy==0.940'
107-
- 'mypy-extensions==0.4.3'
108-
- 'types-setuptools==57.4.14'
109-
- 'types-PyYAML==0.1.9'
106+
- 'mypy'
107+
- 'mypy-extensions'
108+
- 'types-setuptools'
109+
- 'types-PyYAML'
110110
- 'types-requests'
111111
exclude: >
112112
(?x)^(

tools/ci/check_type_comments.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
44
# SPDX-License-Identifier: Apache-2.0
5-
65
import argparse
76
import subprocess
87
from sys import exit
@@ -30,7 +29,7 @@ def types_valid_ignored_rules(file_name): # type: (str) -> bool
3029
"""
3130
Run Mypy check with rules for ignore list on the given file, return TRUE if Mypy check passes
3231
"""
33-
mypy_exit_code = subprocess.call('mypy {} --allow-untyped-defs'.format(file_name), shell=True)
32+
mypy_exit_code = subprocess.call('mypy {} --python-version 3.8 --allow-untyped-defs'.format(file_name), shell=True)
3433
return not bool(mypy_exit_code)
3534

3635

0 commit comments

Comments
 (0)