Skip to content

Commit 5173284

Browse files
committed
use python built in type annotations
1 parent 327c7ee commit 5173284

File tree

3 files changed

+91
-172
lines changed

3 files changed

+91
-172
lines changed

src/etc/lldb_lookup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66

77
# BACKCOMPAT: rust 1.35
8-
def is_hashbrown_hashmap(hash_map):
8+
def is_hashbrown_hashmap(hash_map) -> bool:
99
return len(hash_map.type.fields) == 1
1010

1111

12-
def classify_rust_type(type):
12+
def classify_rust_type(type: lldb.SBType) -> str:
1313
type_class = type.GetTypeClass()
1414
if type_class == lldb.eTypeClassStruct:
1515
return classify_struct(type.name, type.fields)
@@ -19,8 +19,7 @@ def classify_rust_type(type):
1919
return RustType.OTHER
2020

2121

22-
def summary_lookup(valobj, dict):
23-
# type: (SBValue, dict) -> str
22+
def summary_lookup(valobj: lldb.SBValue, dict) -> str:
2423
"""Returns the summary provider for the given value"""
2524
rust_type = classify_rust_type(valobj.GetType())
2625

@@ -66,8 +65,7 @@ def summary_lookup(valobj, dict):
6665
return ""
6766

6867

69-
def synthetic_lookup(valobj, dict):
70-
# type: (SBValue, dict) -> object
68+
def synthetic_lookup(valobj: SBValue, dict) -> object:
7169
"""Returns the synthetic provider for the given value"""
7270
rust_type = classify_rust_type(valobj.GetType())
7371

0 commit comments

Comments
 (0)