mirror of
https://github.com/quantum5/win2xcur.git
synced 2025-04-24 10:11:57 -04:00
Fix mypy and flake8
This commit is contained in:
parent
8fd941e0a0
commit
2dc2d628cf
|
@ -9,8 +9,7 @@ from typing import BinaryIO
|
||||||
|
|
||||||
from win2xcur import shadow
|
from win2xcur import shadow
|
||||||
from win2xcur.parser import open_blob
|
from win2xcur.parser import open_blob
|
||||||
from win2xcur.writer import to_x11
|
from win2xcur.writer.x11 import check_xcursorgen, to_x11
|
||||||
from win2xcur.writer.x11 import check_xcursorgen
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import struct
|
import struct
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, Dict, Iterator, List, Tuple, cast
|
from typing import Any, Dict, List, Tuple, cast
|
||||||
|
|
||||||
from win2xcur.cursor import CursorFrame, CursorImage
|
from win2xcur.cursor import CursorFrame, CursorImage
|
||||||
from win2xcur.parser.base import BaseParser
|
from win2xcur.parser.base import BaseParser
|
||||||
|
|
|
@ -3,7 +3,8 @@ from itertools import chain
|
||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
|
||||||
from win2xcur.cursor import CursorFrame
|
from win2xcur.cursor import CursorFrame
|
||||||
from win2xcur.parser import ANIParser, CURParser
|
from win2xcur.parser.ani import ANIParser
|
||||||
|
from win2xcur.parser.cur import CURParser
|
||||||
|
|
||||||
|
|
||||||
def to_cur(frame: CursorFrame) -> bytes:
|
def to_cur(frame: CursorFrame) -> bytes:
|
||||||
|
@ -59,7 +60,8 @@ def to_ani(frames: List[CursorFrame]) -> bytes:
|
||||||
cur_list,
|
cur_list,
|
||||||
]
|
]
|
||||||
body = b''.join(chunks)
|
body = b''.join(chunks)
|
||||||
return ANIParser.RIFF_HEADER.pack(ANIParser.SIGNATURE, len(body) + 4, ANIParser.ANI_TYPE) + body
|
riff_header: bytes = ANIParser.RIFF_HEADER.pack(ANIParser.SIGNATURE, len(body) + 4, ANIParser.ANI_TYPE)
|
||||||
|
return riff_header + body
|
||||||
|
|
||||||
|
|
||||||
def to_smart(frames: List[CursorFrame]) -> Tuple[str, bytes]:
|
def to_smart(frames: List[CursorFrame]) -> Tuple[str, bytes]:
|
||||||
|
|
Loading…
Reference in a new issue