mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-20 08:40:19 +08:00
chore(ci): pre-commit mypy (#41)
* chore(ci): pre-commit mypy * chore: ignore non-lib files * chore: ignore setup.py * [pre-commit.ci] pre-commit autoupdate (#47) updates: - [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0) - [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore(ci): pre-commit mypy * chore: ignore non-lib files * chore: ignore setup.py * fix: update pre-commit config for mypy * feat: add some missing type hints Co-authored-by: Jérome Eertmans <jeertmans@icloud.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,14 +1,29 @@
|
||||
import platform
|
||||
from typing import Tuple
|
||||
|
||||
import cv2
|
||||
|
||||
FONT_ARGS = (cv2.FONT_HERSHEY_SIMPLEX, 1, 255, 1, cv2.LINE_AA)
|
||||
__all__ = [
|
||||
"FONT_ARGS",
|
||||
"FOLDER_PATH",
|
||||
"CONFIG_PATH",
|
||||
"RIGHT_ARROW_KEY_CODE",
|
||||
"LEFT_ARROW_KEY_CODE",
|
||||
]
|
||||
|
||||
FONT_ARGS: Tuple[int, int, int, int, int] = (
|
||||
cv2.FONT_HERSHEY_SIMPLEX, # type: ignore
|
||||
1,
|
||||
255,
|
||||
1,
|
||||
cv2.LINE_AA, # type: ignore
|
||||
)
|
||||
FOLDER_PATH: str = "./slides"
|
||||
CONFIG_PATH: str = ".manim-slides.json"
|
||||
|
||||
if platform.system() == "Windows":
|
||||
RIGHT_ARROW_KEY_CODE = 2555904
|
||||
LEFT_ARROW_KEY_CODE = 2424832
|
||||
RIGHT_ARROW_KEY_CODE: int = 2555904
|
||||
LEFT_ARROW_KEY_CODE: int = 2424832
|
||||
elif platform.system() == "Darwin":
|
||||
RIGHT_ARROW_KEY_CODE = 63235
|
||||
LEFT_ARROW_KEY_CODE = 63234
|
||||
|
Reference in New Issue
Block a user