Changeset - 32f7064241eb
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-05-18 19:17:31
drewp@bigasterisk.com
c2
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/newtypes.py
Show inline comments
 
@@ -24,13 +24,13 @@ OutputRange = NewType('OutputRange', Tup
 
_ObjType = TypeVar('_ObjType')
 

	
 

	
 
def _isSubclass2(t1: Type, t2: Type) -> bool:
 
    """same as issubclass but t1 can be a NewType"""
 
    if hasattr(t1, '__supertype__'):
 
        t1 = t1.__superType__
 
        t1 = t1.__supertype__
 
    return issubclass(t1, t2)
 

	
 

	
 
def typedValue(objType: Type[_ObjType], graph, subj, pred) -> _ObjType:
 
    """graph.value(subj, pred) with a given return type. 
 
    If objType is not an rdflib.Node, we toPython() the value."""
0 comments (0 inline, 0 general)