mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
get_grouped_opcodes() returns an iterable of groups, not an iterable of opcodes. (#2183)
The type signature of get_grouped_opcodes() was incorrect. Resulting in type errors when checking return values. The usage of this function is like this: groups = sm.get_grouped_opcodes() # groups is Iterable[List[Tuple[str, int, int, int, int]]] for group in groups: # group is List[Tuple[str, int, int, int, int]] for opcode in group: # opcode is Tuple[str, int, int, int, int]
This commit is contained in:
committed by
Jelle Zijlstra
parent
b7ee95aa56
commit
a25ff0bddf
@@ -34,7 +34,7 @@ class SequenceMatcher(Generic[_T]):
|
||||
def get_matching_blocks(self) -> List[Match]: ...
|
||||
def get_opcodes(self) -> List[Tuple[str, int, int, int, int]]: ...
|
||||
def get_grouped_opcodes(self, n: int = ...
|
||||
) -> Iterable[Tuple[str, int, int, int, int]]: ...
|
||||
) -> Iterable[List[Tuple[str, int, int, int, int]]]: ...
|
||||
def ratio(self) -> float: ...
|
||||
def quick_ratio(self) -> float: ...
|
||||
def real_quick_ratio(self) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user