Skip to content

Commit 31a96ea

Browse files
Jack-Khuufacebook-github-bot
authored andcommitted
Fix Debug Handle Map Typing (#363)
Summary: Pull Request resolved: #363 The intended typing for PreprocessResult.debug_handle_map was ``` Dict[int, Tuple[int, ...]] || Dict[str, Tuple[int, ...]] ``` Since the delegate identifier can be either a string or int and maps to a Int Tuple of variable length This fixes the type and gets rid of the pyre ignore Reviewed By: digantdesai, cccclai Differential Revision: D49300700 fbshipit-source-id: eaee31eae6d5539d55e9abae418276a6676361a0
1 parent 1315a92 commit 31a96ea

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

exir/backend/backend_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def enforcedmethod(func):
2222
class PreprocessResult:
2323
processed_bytes: bytes = bytes()
2424
debug_handle_map: Optional[
25-
Union[Dict[int, Tuple[int]], Dict[int, Tuple[int]]]
25+
Union[Dict[int, Tuple[int]], Dict[str, Tuple[int]]]
2626
] = None
2727

2828

exir/backend/test/backend_with_delegate_mapping_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ def preprocess(
153153
processed_bytes=bytes(
154154
str(number_of_instruction) + "#" + processed_bytes, encoding="utf8"
155155
),
156-
# pyre-ignore
157156
debug_handle_map=delegate_builder.get_delegate_mapping(),
158157
)
159158

0 commit comments

Comments
 (0)