mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
check_files.py: pass mypy
Add enough type annotations to pass mypy 0.782 with Python 3.5. The source code will still run normally under older Python versions. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -29,6 +29,10 @@ import codecs
|
|||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
try:
|
||||||
|
from typing import FrozenSet, Optional, Pattern # pylint: disable=unused-import
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class FileIssueTracker:
|
class FileIssueTracker:
|
||||||
@ -48,8 +52,8 @@ class FileIssueTracker:
|
|||||||
``heading``: human-readable description of the issue
|
``heading``: human-readable description of the issue
|
||||||
"""
|
"""
|
||||||
|
|
||||||
suffix_exemptions = frozenset()
|
suffix_exemptions = frozenset() #type: FrozenSet[str]
|
||||||
path_exemptions = None
|
path_exemptions = None #type: Optional[Pattern[str]]
|
||||||
# heading must be defined in derived classes.
|
# heading must be defined in derived classes.
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user