Skip to content

Commit ad58a9e

Browse files
committed
Tiny refactor
1 parent cece830 commit ad58a9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manimlib/mobject/numbers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,14 @@ def get_formatter(self, **kwargs) -> str:
116116
]
117117
])
118118
config.update(kwargs)
119+
ndp = config["num_decimal_places"]
119120
return "".join([
120121
"{",
121122
config.get("field_name", ""),
122123
":",
123124
"+" if config["include_sign"] else "",
124125
"," if config["group_with_commas"] else "",
125-
".", str(config["num_decimal_places"]), "f",
126+
f".{ndp}f",
126127
"}",
127128
])
128129

0 commit comments

Comments
 (0)