fix: fix some bugs caused by type hints and imports

This commit is contained in:
TonyCrane 2022-02-14 20:02:24 +08:00
parent e39f81ccff
commit 7fb6f352c4
No known key found for this signature in database
GPG key ID: 2313A5058A9C637C
2 changed files with 2 additions and 15 deletions

View file

@ -1,18 +1,5 @@
from __future__ import annotations
from typing import Callable
from manimlib.mobject.mobject import Mobject
from manimlib.event_handler.event_type import EventType
class EventListner(object):
def __init__(
self,
mobject: Mobject,
event_type: EventType,
event_callback: Callable[[Mobject, dict[str]]]
):
def __init__(self, mobject, event_type, event_callback):
self.mobject = mobject
self.event_type = event_type
self.callback = event_callback

View file

@ -650,7 +650,7 @@ class Mobject(object):
Otherwise, if about_point is given a value, scaling is done with
respect to that point.
"""
if isinstance(scale_factor, npt.ArrayLike):
if isinstance(scale_factor, Iterable):
scale_factor = np.array(scale_factor).clip(min=min_scale_factor)
else:
scale_factor = max(scale_factor, min_scale_factor)