mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
[pre-commit.ci] pre-commit autoupdate (#121)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) - [github.com/charliermarsh/ruff-pre-commit: v0.0.237 → v0.0.243](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.237...v0.0.243) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
![66853113+pre-commit-ci[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
43c24d7ae1
commit
b06250056d
@ -20,11 +20,11 @@ repos:
|
|||||||
exclude: poetry.lock
|
exclude: poetry.lock
|
||||||
args: [--autofix]
|
args: [--autofix]
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.12.0
|
rev: 23.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||||
rev: v0.0.237
|
rev: v0.0.243
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
@ -39,7 +39,6 @@ class ConvertExample(Slide):
|
|||||||
self.wait(0.1)
|
self.wait(0.1)
|
||||||
|
|
||||||
def construct(self):
|
def construct(self):
|
||||||
|
|
||||||
title = VGroup(
|
title = VGroup(
|
||||||
Text("From Manim animations", t2c={"From": BLUE}),
|
Text("From Manim animations", t2c={"From": BLUE}),
|
||||||
Text("to slides presentation", t2c={"to": BLUE}),
|
Text("to slides presentation", t2c={"to": BLUE}),
|
||||||
@ -250,7 +249,6 @@ class Example(Slide):
|
|||||||
# For ThreeDExample, things are different
|
# For ThreeDExample, things are different
|
||||||
|
|
||||||
if not MANIMGL:
|
if not MANIMGL:
|
||||||
|
|
||||||
# [manim-3d]
|
# [manim-3d]
|
||||||
class ThreeDExample(ThreeDSlide):
|
class ThreeDExample(ThreeDSlide):
|
||||||
def construct(self):
|
def construct(self):
|
||||||
|
@ -44,7 +44,6 @@ def verbosity_option(function: F) -> F:
|
|||||||
"""Wraps a function to add verbosity option."""
|
"""Wraps a function to add verbosity option."""
|
||||||
|
|
||||||
def callback(ctx: Context, param: Parameter, value: bool) -> None:
|
def callback(ctx: Context, param: Parameter, value: bool) -> None:
|
||||||
|
|
||||||
if not value or ctx.resilient_parsing:
|
if not value or ctx.resilient_parsing:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -111,7 +111,6 @@ class SlideConfig(BaseModel): # type: ignore
|
|||||||
cls, values: Dict[str, Union[SlideType, int, bool]]
|
cls, values: Dict[str, Union[SlideType, int, bool]]
|
||||||
) -> Dict[str, Union[SlideType, int, bool]]:
|
) -> Dict[str, Union[SlideType, int, bool]]:
|
||||||
if values["start_animation"] >= values["end_animation"]: # type: ignore
|
if values["start_animation"] >= values["end_animation"]: # type: ignore
|
||||||
|
|
||||||
if values["start_animation"] == values["end_animation"] == 0:
|
if values["start_animation"] == values["end_animation"] == 0:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"You have to play at least one animation (e.g., `self.wait()`) before pausing. If you want to start paused, use the approriate command-line option when presenting. IMPORTANT: when using ManimGL, `self.wait()` is not considered to be an animation, so prefer to directly use `self.play(...)`."
|
"You have to play at least one animation (e.g., `self.wait()`) before pausing. If you want to start paused, use the approriate command-line option when presenting. IMPORTANT: when using ManimGL, `self.wait()` is not considered to be an animation, so prefer to directly use `self.play(...)`."
|
||||||
|
@ -16,7 +16,6 @@ from .present import get_scenes_presentation_config
|
|||||||
def validate_config_option(
|
def validate_config_option(
|
||||||
ctx: Context, param: Parameter, value: Any
|
ctx: Context, param: Parameter, value: Any
|
||||||
) -> Dict[str, str]:
|
) -> Dict[str, str]:
|
||||||
|
|
||||||
config = {}
|
config = {}
|
||||||
|
|
||||||
for c_option in value:
|
for c_option in value:
|
||||||
@ -324,7 +323,6 @@ class RevealJS(Converter):
|
|||||||
presentation_config.concat_animations().move_to(full_assets_dir)
|
presentation_config.concat_animations().move_to(full_assets_dir)
|
||||||
|
|
||||||
with open(dest, "w") as f:
|
with open(dest, "w") as f:
|
||||||
|
|
||||||
sections = "".join(self.get_sections_iter())
|
sections = "".join(self.get_sections_iter())
|
||||||
|
|
||||||
revealjs_template = self.load_template()
|
revealjs_template = self.load_template()
|
||||||
@ -337,7 +335,6 @@ def show_config_options(function: Callable[..., Any]) -> Callable[..., Any]:
|
|||||||
"""Wraps a function to add a `--show-config` option."""
|
"""Wraps a function to add a `--show-config` option."""
|
||||||
|
|
||||||
def callback(ctx: Context, param: Parameter, value: bool) -> None:
|
def callback(ctx: Context, param: Parameter, value: bool) -> None:
|
||||||
|
|
||||||
if not value or ctx.resilient_parsing:
|
if not value or ctx.resilient_parsing:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -364,7 +361,6 @@ def show_template_option(function: Callable[..., Any]) -> Callable[..., Any]:
|
|||||||
"""Wraps a function to add a `--show-template` option."""
|
"""Wraps a function to add a `--show-template` option."""
|
||||||
|
|
||||||
def callback(ctx: Context, param: Parameter, value: bool) -> None:
|
def callback(ctx: Context, param: Parameter, value: bool) -> None:
|
||||||
|
|
||||||
if not value or ctx.resilient_parsing:
|
if not value or ctx.resilient_parsing:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -454,7 +450,6 @@ def convert(
|
|||||||
converter.open(dest)
|
converter.open(dest)
|
||||||
|
|
||||||
except ValidationError as e:
|
except ValidationError as e:
|
||||||
|
|
||||||
errors = e.errors()
|
errors = e.errors()
|
||||||
|
|
||||||
msg = [
|
msg = [
|
||||||
|
@ -114,7 +114,6 @@ class Presentation:
|
|||||||
if (self.loaded_animation_cap != animation) or (
|
if (self.loaded_animation_cap != animation) or (
|
||||||
self.reverse and self.reversed_animation != animation
|
self.reverse and self.reversed_animation != animation
|
||||||
): # cap already loaded
|
): # cap already loaded
|
||||||
|
|
||||||
logger.debug(f"Loading new cap for animation #{animation}")
|
logger.debug(f"Loading new cap for animation #{animation}")
|
||||||
|
|
||||||
self.release_cap()
|
self.release_cap()
|
||||||
@ -575,7 +574,6 @@ class App(QWidget): # type: ignore
|
|||||||
self.thread.start()
|
self.thread.start()
|
||||||
|
|
||||||
def keyPressEvent(self, event: QKeyEvent) -> None:
|
def keyPressEvent(self, event: QKeyEvent) -> None:
|
||||||
|
|
||||||
key = event.key()
|
key = event.key()
|
||||||
if self.config.HIDE_MOUSE.match(key):
|
if self.config.HIDE_MOUSE.match(key):
|
||||||
if self.hide_mouse:
|
if self.hide_mouse:
|
||||||
@ -651,7 +649,9 @@ def _list_scenes(folder: str) -> List[str]:
|
|||||||
try:
|
try:
|
||||||
_ = PresentationConfig.parse_file(filepath)
|
_ = PresentationConfig.parse_file(filepath)
|
||||||
scenes.append(os.path.basename(file)[:-5])
|
scenes.append(os.path.basename(file)[:-5])
|
||||||
except Exception as e: # Could not parse this file as a proper presentation config
|
except (
|
||||||
|
Exception
|
||||||
|
) as e: # Could not parse this file as a proper presentation config
|
||||||
logger.warn(
|
logger.warn(
|
||||||
f"Something went wrong with parsing presentation config `{filepath}`: {e}"
|
f"Something went wrong with parsing presentation config `{filepath}`: {e}"
|
||||||
)
|
)
|
||||||
|
@ -51,7 +51,6 @@ class KeyInput(QDialog): # type: ignore
|
|||||||
|
|
||||||
class Wizard(QWidget): # type: ignore
|
class Wizard(QWidget): # type: ignore
|
||||||
def __init__(self, config: Config):
|
def __init__(self, config: Config):
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.setWindowTitle(WINDOW_NAME)
|
self.setWindowTitle(WINDOW_NAME)
|
||||||
|
Reference in New Issue
Block a user