changeset 2305:63952949106b

move decimalLiteral
author drewp@bigasterisk.com
date Wed, 31 May 2023 01:19:57 -0700
parents 972a54f99b2c
children 3b48a6e6a3c9
files light9/effect/settings_test.py light9/newtypes.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/light9/effect/settings_test.py	Wed May 31 00:13:50 2023 -0700
+++ b/light9/effect/settings_test.py	Wed May 31 01:19:57 2023 -0700
@@ -7,11 +7,7 @@
 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):
--- a/light9/newtypes.py	Wed May 31 00:13:50 2023 -0700
+++ b/light9/newtypes.py	Wed May 31 01:19:57 2023 -0700
@@ -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 @@
     if not tail:
         tail = str(u)
     return tail
+
+
+def decimalLiteral(value):
+    return Literal(value, datatype='http://www.w3.org/2001/XMLSchema#decimal')