changeset 2162:e69661cca1cb

cleanup
author drewp@bigasterisk.com
date Thu, 18 May 2023 11:56:28 -0700
parents b2909ecf1fb3
children 32f7064241eb
files light9/collector/collector.py light9/fade/web/Light9FadeUi.ts light9/fade/web/index.html light9/newtypes.py
diffstat 4 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/light9/collector/collector.py	Thu May 18 11:53:32 2023 -0700
+++ b/light9/collector/collector.py	Thu May 18 11:56:28 2023 -0700
@@ -1,9 +1,9 @@
 import logging
 import time
-from typing import Dict, List, Set, Tuple, Type, TypeVar, cast
+from typing import Dict, List, Set, Tuple, cast
 
 from rdfdb.syncedgraph.syncedgraph import SyncedGraph
-from rdflib import Literal, URIRef
+from rdflib import Literal
 
 from light9.collector.device import resolve, toOutputAttrs
 from light9.collector.output import Output as OutputInstance
@@ -19,8 +19,6 @@
     return DmxMessageIndex(base + offset - 1)
 
 
-
-
 def outputMap(graph: SyncedGraph, outputs: List[OutputInstance]) -> Dict[Tuple[DeviceUri, OutputAttr], Tuple[OutputInstance, DmxMessageIndex]]:
     """From rdf config graph, compute a map of
        (device, outputattr) : (output, index)
--- a/light9/fade/web/Light9FadeUi.ts	Thu May 18 11:53:32 2023 -0700
+++ b/light9/fade/web/Light9FadeUi.ts	Thu May 18 11:56:28 2023 -0700
@@ -5,7 +5,7 @@
 import { NamedNode } from "n3";
 import { getTopGraph } from "../../web/RdfdbSyncedGraph";
 import { SyncedGraph } from "../../web/SyncedGraph";
-import { shortShow, showRoot } from "light9/web/show_specific";
+import { shortShow, showRoot } from "../../web/show_specific";
 export { EditChoice } from "../../web/EditChoice";
 
 provideFASTDesignSystem().register(fastSlider(), fastSliderLabel());
@@ -60,6 +60,8 @@
     css`
       :host {
         display: inline-block;
+        border: 2px gray outset;
+        background: #272727;
       }
       fast-slider {
         height: 256px;
--- a/light9/fade/web/index.html	Thu May 18 11:53:32 2023 -0700
+++ b/light9/fade/web/index.html	Thu May 18 11:56:28 2023 -0700
@@ -3,7 +3,7 @@
   <head>
     <title>fade</title>
     <meta charset="utf-8" />
-    <link rel="stylesheet" href="./style.css">    
+    <link rel="stylesheet" href="../style.css">    
     <script type="module" src="../fade/Light9FadeUi"></script>
   </head>
   <body>
--- a/light9/newtypes.py	Thu May 18 11:53:32 2023 -0700
+++ b/light9/newtypes.py	Thu May 18 11:56:28 2023 -0700
@@ -24,7 +24,7 @@
 _ObjType = TypeVar('_ObjType')
 
 
-def _isSubclass2(t1: Type, t2: type) -> bool:
+def _isSubclass2(t1: Type, t2: Type) -> bool:
     """same as issubclass but t1 can be a NewType"""
     if hasattr(t1, '__supertype__'):
         t1 = t1.__superType__
@@ -32,7 +32,8 @@
 
 
 def typedValue(objType: Type[_ObjType], graph, subj, pred) -> _ObjType:
-    """graph.value(subj, pred) with a given return type. If objType is """
+    """graph.value(subj, pred) with a given return type. 
+    If objType is not an rdflib.Node, we toPython() the value."""
     obj = graph.value(subj, pred)
     if obj is None:
         raise ValueError()