mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: update mypy check for python 3.12, check under python 3.8 rules
This commit is contained in:
parent
01c13a72a6
commit
6a4db9c07b
@ -103,10 +103,10 @@ repos:
|
||||
name: Check type annotations in python files
|
||||
entry: tools/ci/check_type_comments.py
|
||||
additional_dependencies:
|
||||
- 'mypy==0.940'
|
||||
- 'mypy-extensions==0.4.3'
|
||||
- 'types-setuptools==57.4.14'
|
||||
- 'types-PyYAML==0.1.9'
|
||||
- 'mypy'
|
||||
- 'mypy-extensions'
|
||||
- 'types-setuptools'
|
||||
- 'types-PyYAML'
|
||||
- 'types-requests'
|
||||
exclude: >
|
||||
(?x)^(
|
||||
|
@ -2,7 +2,6 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
from sys import exit
|
||||
@ -30,7 +29,7 @@ def types_valid_ignored_rules(file_name): # type: (str) -> bool
|
||||
"""
|
||||
Run Mypy check with rules for ignore list on the given file, return TRUE if Mypy check passes
|
||||
"""
|
||||
mypy_exit_code = subprocess.call('mypy {} --allow-untyped-defs'.format(file_name), shell=True)
|
||||
mypy_exit_code = subprocess.call('mypy {} --python-version 3.8 --allow-untyped-defs'.format(file_name), shell=True)
|
||||
return not bool(mypy_exit_code)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user