summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 4a160983..d740ce92 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -30,7 +30,7 @@ import inspect
import os
import uuid
from typing import Callable, Generator, Optional, Union, Tuple, List, Mapping, Any, \
- Iterator, Iterable, KeysView, ItemsView, ValuesView, Dict
+ Iterator, Iterable, KeysView, ItemsView, ValuesView, Dict, overload
from dataclasses import dataclass
from enum import IntFlag
@@ -1985,6 +1985,12 @@ class FunctionList:
self._n += 1
return _function.Function(self._view, func)
+ @overload
+ def __getitem__(self, i: int) -> '_function.Function': ...
+
+ @overload
+ def __getitem__(self, i: slice) -> List['_function.Function']: ...
+
def __getitem__(self, i: Union[int, slice]) -> Union['_function.Function', List['_function.Function']]:
if isinstance(i, int):
if i < 0: