comparison service/collector/stubs/rdfdb/patch.pyi @ 450:5595c447c630

more stubs for collector typechecking Ignore-this: 7151f942cfc29c2b3dfaa0a6b20222aa
author drewp@bigasterisk.com
date Fri, 19 Apr 2019 01:07:29 -0700
parents
children
comparison
equal deleted inserted replaced
449:ef7eba0551f2 450:5595c447c630
1 # Stubs for rdfdb.patch (Python 3)
2 #
3
4 # these should move into patch.py itself, but I'm keeping it py2-friendly for now
5
6 import unittest
7 from typing import Any, Optional, Iterable, Dict, Collection, Tuple
8 from rdflib import StatementType
9 from rdflib.term import Node, URIRef
10 from rdflib.graph import ConjunctiveGraph
11
12
13 def quadsWithContextUris(quads: Any) -> None: ...
14
15 class Patch:
16 def __init__(self,
17 jsonRepr: Optional[Any] = ...,
18 addQuads: Optional[Iterable[StatementType]] = ...,
19 delQuads: Optional[Iterable[StatementType]] = ...,
20 addGraph: Optional[ConjunctiveGraph] = ...,
21 delGraph: Optional[ConjunctiveGraph] = ...): ...
22 def shortSummary(self) -> str: ...
23 @classmethod
24 def fromDiff(cls, oldGraph: ConjunctiveGraph, newGraph: ConjunctiveGraph) -> Patch: ...
25 def __nonzero__(self) -> bool: ...
26 @property
27 def addQuads(self) -> Collection[StatementType]: ...
28 @property
29 def delQuads(self) -> Collection[StatementType]: ...
30 @property
31 def addGraph(self) -> ConjunctiveGraph: ...
32 @property
33 def delGraph(self) -> ConjunctiveGraph: ...
34 @property
35 def jsonRepr(self) -> str: ...
36 def makeJsonRepr(self, extraAttrs: Optional[Dict]) -> str: ...
37 def simplify(self) -> Patch: ...
38 def concat(self, more: Iterable[Patch]) -> Patch: ...
39 def getContext(self) -> URIRef: ...
40 def isNoop(self) -> bool: ...