Skip to content

Commit 501b16c

Browse files
Use typing_extensions.NotRequired to reduce boilerplate
1 parent 5e4afaf commit 501b16c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

manim/mobject/graphing/coordinate_systems.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from typing import TYPE_CHECKING, Any, Callable, TypeVar, overload
1818

1919
import numpy as np
20-
from typing_extensions import Self, TypedDict
20+
from typing_extensions import NotRequired, Self, TypedDict
2121

2222
from manim import config
2323
from manim.constants import *
@@ -72,7 +72,7 @@ class _MatmulConfig(TypedDict):
7272
"""
7373

7474
method: str
75-
unpack: bool
75+
unpack: NotRequired[bool]
7676

7777

7878
class CoordinateSystem:
@@ -3042,9 +3042,8 @@ def construct(self):
30423042

30433043
_matmul_config = {
30443044
"method": "polar_to_point",
3045-
"unpack": True,
30463045
}
3047-
_rmatmul_config = {"method": "point_to_polar", "unpack": False}
3046+
_rmatmul_config = {"method": "point_to_polar"}
30483047

30493048
def __init__(
30503049
self,
@@ -3418,7 +3417,7 @@ def construct(self):
34183417

34193418
_matmul_config = {"method": "number_to_point", "unpack": False}
34203419

3421-
_rmatmul_config = {"method": "point_to_number", "unpack": False}
3420+
_rmatmul_config = {"method": "point_to_number"}
34223421

34233422
def __init__(self, **kwargs: Any) -> None:
34243423
super().__init__(

0 commit comments

Comments
 (0)