mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 08:37:25 +00:00
Fix issues raised by Pylint 2.4.4 on CI
Locally they were unreported by Pylint 2.9.2. Signed-off-by: Yuto Takano <yuto.takano@arm.com>
This commit is contained in:
parent
4b7d23dfa6
commit
3590691bad
@ -408,7 +408,7 @@ class CodeParser():
|
|||||||
# beginning of the line -- if they are indented, they might
|
# beginning of the line -- if they are indented, they might
|
||||||
# be sub-structures within structs, etc.
|
# be sub-structures within structs, etc.
|
||||||
if (state == states.OUTSIDE_KEYWORD and
|
if (state == states.OUTSIDE_KEYWORD and
|
||||||
re.search(r"^(typedef +)?enum +{", line)):
|
re.search(r"^(typedef +)?enum +{", line)):
|
||||||
state = states.IN_BRACES
|
state = states.IN_BRACES
|
||||||
elif (state == states.OUTSIDE_KEYWORD and
|
elif (state == states.OUTSIDE_KEYWORD and
|
||||||
re.search(r"^(typedef +)?enum", line)):
|
re.search(r"^(typedef +)?enum", line)):
|
||||||
@ -461,9 +461,10 @@ class CodeParser():
|
|||||||
# Match names of typedef instances, after closing bracket.
|
# Match names of typedef instances, after closing bracket.
|
||||||
r"}? *(\w+)[;[].*"
|
r"}? *(\w+)[;[].*"
|
||||||
)
|
)
|
||||||
|
# The regex below is indented for clarity.
|
||||||
exclusion_lines = re.compile(
|
exclusion_lines = re.compile(
|
||||||
r"^("
|
r"^("
|
||||||
r"extern +\"C\"|"
|
r"extern +\"C\"|" # pylint: disable=bad-continuation
|
||||||
r"(typedef +)?(struct|union|enum)( *{)?$|"
|
r"(typedef +)?(struct|union|enum)( *{)?$|"
|
||||||
r"} *;?$|"
|
r"} *;?$|"
|
||||||
r"$|"
|
r"$|"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user