Skip to content

Commit 1c68e52

Browse files
Use typing_extensions.NotRequired to reduce boilerplate
1 parent ad78681 commit 1c68e52

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:
@@ -3022,9 +3022,8 @@ def construct(self):
30223022

30233023
_matmul_config = {
30243024
"method": "polar_to_point",
3025-
"unpack": True,
30263025
}
3027-
_rmatmul_config = {"method": "point_to_polar", "unpack": False}
3026+
_rmatmul_config = {"method": "point_to_polar"}
30283027

30293028
def __init__(
30303029
self,
@@ -3398,7 +3397,7 @@ def construct(self):
33983397

33993398
_matmul_config = {"method": "number_to_point", "unpack": False}
34003399

3401-
_rmatmul_config = {"method": "point_to_number", "unpack": False}
3400+
_rmatmul_config = {"method": "point_to_number"}
34023401

34033402
def __init__(self, **kwargs: Any) -> None:
34043403
super().__init__(

0 commit comments

Comments
 (0)