mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Add type hints for compiled modules
This commit is contained in:
parent
81c593399e
commit
d73a85b82e
13
core/pe/block.pyi
Normal file
13
core/pe/block.pyi
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import Tuple, List, Union, Sequence
|
||||
|
||||
_block = Tuple[int, int, int]
|
||||
|
||||
class NoBlocksError(Exception): ... # noqa: E302, E701
|
||||
class DifferentBlockCountError(Exception): ... # noqa E701
|
||||
|
||||
def getblock(image: object) -> Union[_block, None]: ... # noqa: E302
|
||||
def getblocks2(image: object, block_count_per_side: int) -> Union[List[_block], None]: ...
|
||||
def diff(first: _block, second: _block) -> int: ...
|
||||
def avgdiff( # noqa: E302
|
||||
first: Sequence[_block], second: Sequence[_block], limit: int = 768, min_iterations: int = 1
|
||||
) -> Union[int, None]: ...
|
6
core/pe/cache.pyi
Normal file
6
core/pe/cache.pyi
Normal file
@ -0,0 +1,6 @@
|
||||
from typing import Union, Tuple, List
|
||||
|
||||
_block = Tuple[int, int, int]
|
||||
|
||||
def colors_to_string(colors: List[_block]) -> str: ... # noqa: E302
|
||||
def string_to_colors(s: str) -> Union[List[_block], None]: ...
|
7
qt/pe/block.pyi
Normal file
7
qt/pe/block.pyi
Normal file
@ -0,0 +1,7 @@
|
||||
from typing import Tuple, List, Union
|
||||
from PyQt5.QtGui import QImage
|
||||
|
||||
_block = Tuple[int, int, int]
|
||||
|
||||
def getblock(image: QImage) -> _block: ... # noqa: E302
|
||||
def getblocks(image: QImage, block_count_per_side: int) -> Union[List[_block], None]: ...
|
Loading…
x
Reference in New Issue
Block a user