Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

[pre-commit.ci] pre-commit autoupdate (#1405)

pre-commit-ci[bot]0e12770edc91
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e4d018d17..4c36f5753 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,7 +6,7 @@ repos:
hooks:
- id: mixed-line-ending
- repo: https://github.com/psf/black
- rev: 20.8b1
+ rev: 21.4b0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
diff --git a/manim/camera/multi_camera.py b/manim/camera/multi_camera.py
index 0f9a04169..0d0285b81 100644
--- a/manim/camera/multi_camera.py
+++ b/manim/camera/multi_camera.py
@@ -50,7 +50,7 @@ class MultiCamera(MovingCamera):
self.image_mobjects_from_cameras.append(imfc)
def update_sub_cameras(self):
- """ Reshape sub_camera pixel_arrays """
+ """Reshape sub_camera pixel_arrays"""
for imfc in self.image_mobjects_from_cameras:
pixel_height, pixel_width = self.pixel_array.shape[:2]
imfc.camera.frame_shape = (
diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.py
index 36e35d92a..7e6b42459 100644
--- a/manim/mobject/mobject.py
+++ b/manim/mobject/mobject.py
@@ -1847,15 +1847,15 @@ class Mobject(Container):
return self.get_extremum_along_dim(dim=dim, key=direction[dim])
def get_x(self, direction=ORIGIN) -> np.float64:
- """Returns x coordinate of the center of the :class:`~.Mobject` as ``float`` """
+ """Returns x coordinate of the center of the :class:`~.Mobject` as ``float``"""
return self.get_coord(0, direction)
def get_y(self, direction=ORIGIN) -> np.float64:
- """Returns y coordinate of the center of the :class:`~.Mobject` as ``float`` """
+ """Returns y coordinate of the center of the :class:`~.Mobject` as ``float``"""
return self.get_coord(1, direction)
def get_z(self, direction=ORIGIN) -> np.float64:
- """Returns z coordinate of the center of the :class:`~.Mobject` as ``float`` """
+ """Returns z coordinate of the center of the :class:`~.Mobject` as ``float``"""
return self.get_coord(2, direction)
def get_start(self):
@@ -1875,7 +1875,7 @@ class Mobject(Container):
return np.array(self.points[-1])
def get_start_and_end(self):
- """Returns starting and ending point of a stroke as a ``tuple``. """
+ """Returns starting and ending point of a stroke as a ``tuple``."""
return self.get_start(), self.get_end()
def point_from_proportion(self, alpha):
@@ -1898,7 +1898,7 @@ class Mobject(Container):
return z_index_group.get_center()
def has_points(self) -> bool:
- """Check if :class:`~.Mobject` contains points. """
+ """Check if :class:`~.Mobject` contains points."""
return len(self.points) > 0
def has_no_points(self) -> bool:
diff --git a/manim/mobject/opengl_geometry.py b/manim/mobject/opengl_geometry.py
index d01ad287a..8f47ef6c2 100644
--- a/manim/mobject/opengl_geometry.py
+++ b/manim/mobject/opengl_geometry.py
@@ -341,7 +341,7 @@ class OpenGLDot(OpenGLCircle):
class OpenGLSmallDot(OpenGLDot):
- """ Deprecated"""
+ """Deprecated"""
def __init__(self, radius=DEFAULT_SMALL_DOT_RADIUS, **kwargs):
logger.warning(
diff --git a/manim/utils/tex_templates.py b/manim/utils/tex_templates.py
index 2c31faec4..7c43b69c0 100644
--- a/manim/utils/tex_templates.py
+++ b/manim/utils/tex_templates.py
@@ -11,7 +11,7 @@ from .tex import *
def _new_ams_template():
- """ Returns a simple Tex Template with only basic AMS packages """
+ """Returns a simple Tex Template with only basic AMS packages"""
preamble = r"""
\usepackage[english]{babel}
\usepackage{amsmath}