mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
ci: update mypy check for python 3.12, check under python 3.7 rules
This commit is contained in:
parent
47418a88b9
commit
f39f8d4a3f
@ -104,10 +104,10 @@ repos:
|
|||||||
name: Check type annotations in python files
|
name: Check type annotations in python files
|
||||||
entry: tools/ci/check_type_comments.py
|
entry: tools/ci/check_type_comments.py
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- 'mypy==0.940'
|
- 'mypy'
|
||||||
- 'mypy-extensions==0.4.3'
|
- 'mypy-extensions'
|
||||||
- 'types-setuptools==57.4.14'
|
- 'types-setuptools'
|
||||||
- 'types-PyYAML==0.1.9'
|
- 'types-PyYAML'
|
||||||
exclude: >
|
exclude: >
|
||||||
(?x)^(
|
(?x)^(
|
||||||
.*_pb2.py
|
.*_pb2.py
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
from sys import exit
|
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
|
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.7 --allow-untyped-defs'.format(file_name), shell=True)
|
||||||
return not bool(mypy_exit_code)
|
return not bool(mypy_exit_code)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user