mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-07-15 00:52:15 +08:00

* 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>
33 lines
686 B
Python
33 lines
686 B
Python
import platform
|
|
from typing import Tuple
|
|
|
|
import cv2
|
|
|
|
__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: int = 2555904
|
|
LEFT_ARROW_KEY_CODE: int = 2424832
|
|
elif platform.system() == "Darwin":
|
|
RIGHT_ARROW_KEY_CODE = 63235
|
|
LEFT_ARROW_KEY_CODE = 63234
|
|
else:
|
|
RIGHT_ARROW_KEY_CODE = 65363
|
|
LEFT_ARROW_KEY_CODE = 65361
|