annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
450
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
1 # Stubs for rdfdb.patch (Python 3)
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
2 #
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
3
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
4 # these should move into patch.py itself, but I'm keeping it py2-friendly for now
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
5
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
6 import unittest
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
7 from typing import Any, Optional, Iterable, Dict, Collection, Tuple
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
8 from rdflib import StatementType
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
9 from rdflib.term import Node, URIRef
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
10 from rdflib.graph import ConjunctiveGraph
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
11
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
12
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
13 def quadsWithContextUris(quads: Any) -> None: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
14
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
15 class Patch:
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
16 def __init__(self,
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
17 jsonRepr: Optional[Any] = ...,
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
18 addQuads: Optional[Iterable[StatementType]] = ...,
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
19 delQuads: Optional[Iterable[StatementType]] = ...,
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
20 addGraph: Optional[ConjunctiveGraph] = ...,
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
21 delGraph: Optional[ConjunctiveGraph] = ...): ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
22 def shortSummary(self) -> str: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
23 @classmethod
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
24 def fromDiff(cls, oldGraph: ConjunctiveGraph, newGraph: ConjunctiveGraph) -> Patch: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
25 def __nonzero__(self) -> bool: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
26 @property
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
27 def addQuads(self) -> Collection[StatementType]: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
28 @property
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
29 def delQuads(self) -> Collection[StatementType]: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
30 @property
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
31 def addGraph(self) -> ConjunctiveGraph: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
32 @property
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
33 def delGraph(self) -> ConjunctiveGraph: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
34 @property
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
35 def jsonRepr(self) -> str: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
36 def makeJsonRepr(self, extraAttrs: Optional[Dict]) -> str: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
37 def simplify(self) -> Patch: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
38 def concat(self, more: Iterable[Patch]) -> Patch: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
39 def getContext(self) -> URIRef: ...
5595c447c630 more stubs for collector typechecking
drewp@bigasterisk.com
parents:
diff changeset
40 def isNoop(self) -> bool: ...