# HG changeset patch # User drewp@bigasterisk.com # Date 1684436188 25200 # Node ID e69661cca1cbac201d240ce9a90f81c7f5440fdc # Parent b2909ecf1fb33ba679219320d9aeddbf83b629f7 cleanup diff -r b2909ecf1fb3 -r e69661cca1cb light9/collector/collector.py --- 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) diff -r b2909ecf1fb3 -r e69661cca1cb light9/fade/web/Light9FadeUi.ts --- 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; diff -r b2909ecf1fb3 -r e69661cca1cb light9/fade/web/index.html --- 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 @@ fade - + diff -r b2909ecf1fb3 -r e69661cca1cb light9/newtypes.py --- 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()