Skip to content

Commit

Permalink
type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacZhangzhuo committed Dec 7, 2023
1 parent 0970fc1 commit 1c38e41
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/compas_viewer/configurations/controller_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from pathlib import Path
from typing import Dict
from typing import List
from typing import TypedDict

from compas_viewer import DATA
Expand All @@ -10,12 +12,12 @@ class MouseConfigData(TypedDict):
The type template for the mouse only.
"""

zoom: dict
pan: dict
rotate: dict
box_selection: dict
box_deselection: dict
selection: dict
zoom: Dict[str, str]
pan: Dict[str, str]
rotate: Dict[str, str]
box_selection: Dict[str, str]
box_deselection: Dict[str, str]
selection: Dict[str, str]


class KeyConfigData(TypedDict):
Expand All @@ -24,7 +26,7 @@ class KeyConfigData(TypedDict):
"""

name: str
keys: list[str]
keys: List[str]


class ControllerConfigData(TypedDict):
Expand All @@ -33,7 +35,7 @@ class ControllerConfigData(TypedDict):
"""

mouse: MouseConfigData
keys: list[KeyConfigData]
keys: List[KeyConfigData]


class KeyConfig(Config):
Expand Down

0 comments on commit 1c38e41

Please sign in to comment.