Skip to content

Commit

Permalink
Fix UnionType on Python3.9 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt authored Nov 30, 2022
1 parent 772601d commit 62284ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion matter_server/common/helpers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import logging
import platform
from pydoc import locate
from types import UnionType
import typing
from typing import Any, Dict, Optional, Set, Type, Union, get_args, get_origin

Expand All @@ -32,9 +31,11 @@
try:
# python 3.10
from types import NoneType
from types import UnionType
except: # noqa
# older python version
NoneType = type(None)
UnionType = type(int | str)

CHIP_CLUSTERS_PKG_NAME = "home-assistant-chip-clusters"
CHIP_CORE_PKG_NAME = "home-assistant-chip-core"
Expand Down

0 comments on commit 62284ca

Please sign in to comment.