Skip to content

Commit c8f02b6

Browse files
committed
fixup! Modernize python code for construct and add types (eliben#609)
1 parent 638ef24 commit c8f02b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

elftools/construct/lib/container.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __getitem__(self, name: Literal[
6565
"length",
6666
"n_descsz", "n_offset", "n_namesz",
6767
"sh_addralign", "sh_flags", "sh_size",
68-
"bloom_size", "nbuckets",
68+
"bloom_size", "nbuckets", "nchains",
6969
]) -> int: ...
7070
@overload
7171
def __getitem__(self, name: Literal[
@@ -75,6 +75,10 @@ def __getitem__(self, name: Literal[
7575
"tag", "vendor_name",
7676
]) -> str: ...
7777
@overload
78+
def __getitem__(self, name: Literal[
79+
"buckets", "chains",
80+
]) -> list[int]: ...
81+
@overload
7882
def __getitem__(self, name: str) -> Any: ...
7983
def __getitem__(self, name: str) -> Any:
8084
return self.__dict__[name]

0 commit comments

Comments
 (0)