# HG changeset patch # User drewp@bigasterisk.com # Date 2023-05-31 08:19:57 # Node ID 63952949106b8b4d0c0199e1bd2ffa4816203104 # Parent 972a54f99b2cce7f830553e69ec0bad05abdcfd5 move decimalLiteral diff --git a/light9/effect/settings_test.py b/light9/effect/settings_test.py --- a/light9/effect/settings_test.py +++ b/light9/effect/settings_test.py @@ -7,11 +7,7 @@ from rdflib import Literal from light9.effect.settings import DeviceSettings from light9.localsyncedgraph import LocalSyncedGraph from light9.namespaces import DEV, L9 -from light9.newtypes import DeviceAttr, DeviceUri, HexColor, VTUnion - - -def decimalLiteral(value): - return Literal(value, datatype='http://www.w3.org/2001/XMLSchema#decimal') +from light9.newtypes import DeviceAttr, DeviceUri, HexColor, VTUnion, decimalLiteral class TestDeviceSettings(unittest.TestCase): diff --git a/light9/newtypes.py b/light9/newtypes.py --- a/light9/newtypes.py +++ b/light9/newtypes.py @@ -1,6 +1,6 @@ from typing import NewType, Tuple, TypeVar, Union -from rdflib import URIRef +from rdflib import Literal, URIRef ClientType = NewType('ClientType', str) ClientSessionType = NewType('ClientSessionType', str) @@ -37,3 +37,7 @@ def uriTail(u: URIRef) -> str: if not tail: tail = str(u) return tail + + +def decimalLiteral(value): + return Literal(value, datatype='http://www.w3.org/2001/XMLSchema#decimal')