Skip to content

Commit d4fe57e

Browse files
author
Joel Collins
committed
Allow calling abstract Semantics
1 parent a455797 commit d4fe57e

File tree

1 file changed

+4
-1
lines changed
  • src/labthings/server/semantics

1 file changed

+4
-1
lines changed

src/labthings/server/semantics/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33

44
class Semantic:
5-
pass
5+
def __call__(self, viewcls):
6+
# Use the class name as the semantic type
7+
viewcls.semtype = self.__class__.__name__
8+
return viewcls
69

710

811
# BASIC PROPERTIES

0 commit comments

Comments
 (0)