Skip to content

Commit f26d521

Browse files
committed
style(configs): add type hint ClassVar to some variables
1 parent 8416457 commit f26d521

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

maliang/core/configs.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import platform
2323
import sys
2424
import tkinter
25-
from typing import Any, Final, Literal
25+
from typing import Any, ClassVar, Final, Literal
2626

2727

2828
class _DefaultRootDescriptor:
@@ -53,12 +53,12 @@ class Env:
5353
"""
5454

5555
# Global configurations
56-
system: str
57-
theme: Literal["light", "dark"]
56+
system: ClassVar[str]
57+
theme: ClassVar[Literal["light", "dark"]]
5858

5959
# Default parameters for widgets
60-
gradient_animation: bool
61-
auto_update: bool
60+
gradient_animation: ClassVar[bool]
61+
auto_update: ClassVar[bool]
6262

6363
# Dynamic value
6464
root = _DefaultRootDescriptor()
@@ -92,8 +92,8 @@ class Font:
9292
size (int): The default font size, negative value means size in pixels.
9393
"""
9494

95-
family: str
96-
size: int
95+
family: ClassVar[str]
96+
size: ClassVar[int]
9797

9898
@classmethod
9999
def reset(cls) -> None:

0 commit comments

Comments
 (0)