Skip to content

Commit b18c554

Browse files
Use str.removeprefix and bump mypy python version
1 parent eb3dff0 commit b18c554

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

manim/mobject/mobject.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -679,13 +679,9 @@ def __getattr__(self, attr: str) -> types.MethodType:
679679
# Add automatic compatibility layer
680680
# between properties and get_* and set_*
681681
# methods.
682-
#
683-
# In python 3.9+ we could change this
684-
# logic to use str.remove_prefix instead.
685682

686683
if attr.startswith("get_"):
687-
# Remove the "get_" prefix
688-
to_get = attr[4:]
684+
to_get = attr.removeprefix("get_")
689685

690686
def getter(self):
691687
warnings.warn(

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[mypy]
22
strict = False
33
files = manim
4-
python_version = 3.10
4+
python_version = 3.11
55
; plugins = numpy.typing.mypy_plugin
66
ignore_errors = False
77
cache_fine_grained = True

0 commit comments

Comments
 (0)