Skip to content

Commit 292e49d

Browse files
Deprecated SmallDot + OpenGLSmallDot (#1110)
* Depreciated Small Dot * Depreciated OpenGLSmallDot Import logger Fix indentation issue * Black formatting * Fixed typo
1 parent 265e725 commit 292e49d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

manim/mobject/geometry.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def construct(self):
7676
from ..utils.space_ops import normalize
7777
from ..utils.space_ops import rotate_vector
7878
from ..utils.color import *
79+
from .. import logger
7980

8081
DEFAULT_DOT_RADIUS = 0.08
8182
DEFAULT_SMALL_DOT_RADIUS = 0.04
@@ -443,11 +444,13 @@ def __init__(
443444

444445

445446
class SmallDot(Dot):
446-
"""
447-
A dot with small radius
448-
"""
447+
"""Deprecated - A dot with small radius"""
449448

450449
def __init__(self, radius=DEFAULT_SMALL_DOT_RADIUS, **kwargs):
450+
logger.warning(
451+
"SmallDot has been deprecated and will be removed in a future release. "
452+
"Use Dot instead."
453+
)
451454
Dot.__init__(self, radius=radius, **kwargs)
452455

453456

manim/mobject/opengl_geometry.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22

3+
from .. import logger
34
from ..constants import *
45
from ..mobject.mobject import Mobject
56
from ..mobject.types.opengl_vectorized_mobject import (
@@ -341,7 +342,13 @@ def __init__(
341342

342343

343344
class OpenGLSmallDot(OpenGLDot):
345+
""" Deprecated"""
346+
344347
def __init__(self, radius=DEFAULT_SMALL_DOT_RADIUS, **kwargs):
348+
logger.warning(
349+
"OpenGLSmallDot has been deprecated and will be removed in a future release."
350+
"Use OpenGLDot instead."
351+
)
345352
super().__init__(radius=radius, **kwargs)
346353

347354

0 commit comments

Comments
 (0)