Skip to content

Commit b3a33cf

Browse files
committed
extract_utils: add type hints for BpBuilder's set() method
Change-Id: I70bbafc7fcea63e38210a98227f90d7967fee713
1 parent 84f4349 commit b3a33cf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

extract_utils/bp_builder.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from enum import Enum
99
from json import JSONEncoder
10-
from typing import List, Optional
10+
from typing import Dict, List, Optional
1111

1212
from extract_utils.elf_parser import EM
1313
from extract_utils.file import File
@@ -78,7 +78,12 @@ def set_rule_name(self, rule_name: str):
7878
self.__rule_name = rule_name
7979
return self
8080

81-
def set(self, k, v, optional=False):
81+
def set(
82+
self,
83+
k: str,
84+
v: Optional[str | bool | List | Dict],
85+
optional=False,
86+
):
8287
assert v is not None or optional
8388
if v is not None:
8489
self.o[k] = v

0 commit comments

Comments
 (0)