diff options
author | Roman A <121314722+GameRoMan@users.noreply.github.com> | 2025-05-12 16:13:08 +0100 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2025-05-26 09:02:24 +0800 |
commit | 88094970943d11c7c11710839e3d73b3e21fbaae (patch) | |
tree | 7d59838197032da34b4ce4ceadd8b90afc4d92bd | |
parent | a8f0e70dbfa65e408e3b302c187654f1862e8fb0 (diff) | |
download | edk2-88094970943d11c7c11710839e3d73b3e21fbaae.zip edk2-88094970943d11c7c11710839e3d73b3e21fbaae.tar.gz edk2-88094970943d11c7c11710839e3d73b3e21fbaae.tar.bz2 |
BaseTools: Fix type annotations
Fixed type annotations for functions:
- `def _parse_pattern(line: str) -> Tuple[str]:` -> `def _parse_pattern(line: str) -> Tuple[bool, str, str]:`
- `def get_scopes(codeql_enabled: bool) -> Tuple[str]:` -> `def get_scopes(codeql_enabled: bool) -> Tuple[str, ...]:`
Signed-off-by: Roman A <gameromandev@gmail.com>
-rw-r--r-- | BaseTools/Plugin/CodeQL/analyze/analyze_filter.py | 6 | ||||
-rw-r--r-- | BaseTools/Plugin/CodeQL/integration/stuart_codeql.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/BaseTools/Plugin/CodeQL/analyze/analyze_filter.py b/BaseTools/Plugin/CodeQL/analyze/analyze_filter.py index f363dd3..dd9f149 100644 --- a/BaseTools/Plugin/CodeQL/analyze/analyze_filter.py +++ b/BaseTools/Plugin/CodeQL/analyze/analyze_filter.py @@ -60,15 +60,15 @@ def _match_path_and_rule( return result
-def _parse_pattern(line: str) -> Tuple[str]:
+def _parse_pattern(line: str) -> Tuple[bool, str, str]:
"""Parses a given pattern line.
Args:
line (str): The line string that contains the rule.
Returns:
- Tuple[str]: The parsed sign, file pattern, and rule pattern from the
- line.
+ Tuple[bool, str, str]: The parsed sign, file pattern,
+ and rule pattern from the line.
"""
sep_char = ':'
esc_char = '\\'
diff --git a/BaseTools/Plugin/CodeQL/integration/stuart_codeql.py b/BaseTools/Plugin/CodeQL/integration/stuart_codeql.py index a3941d1..4e1c4d1 100644 --- a/BaseTools/Plugin/CodeQL/integration/stuart_codeql.py +++ b/BaseTools/Plugin/CodeQL/integration/stuart_codeql.py @@ -29,7 +29,7 @@ def add_command_line_option(parser: ArgumentParser) -> None: "BaseTools/Plugin/CodeQL/Readme.md for more info.")
-def get_scopes(codeql_enabled: bool) -> Tuple[str]:
+def get_scopes(codeql_enabled: bool) -> Tuple[str, ...]:
"""Returns the active CodeQL scopes for this build.
Args:
|