Skip to content

Commit

Permalink
fix(light_controller): import Literal from typing if using python 3.8…
Browse files Browse the repository at this point in the history
… or higher
  • Loading branch information
xaviml committed Nov 21, 2020
1 parent b819074 commit af99d3f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/controllerx/cx_core/type/light_controller.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from typing import Any, Dict, Optional, Type, Union

from cx_const import Light, TypeActionsMapping
Expand All @@ -8,7 +9,12 @@
from cx_core.stepper.circular_stepper import CircularStepper
from cx_core.stepper.minmax_stepper import MinMaxStepper
from cx_core.type_controller import Entity, TypeController
from typing_extensions import Literal

if sys.version_info[1] < 8:
from typing_extensions import Literal
else:
from typing import Literal


DEFAULT_MANUAL_STEPS = 10
DEFAULT_AUTOMATIC_STEPS = 10
Expand Down

0 comments on commit af99d3f

Please sign in to comment.