view 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
line wrap: on
line source

# Stubs for rdfdb.patch (Python 3)
#

# these should move into patch.py itself, but I'm keeping it py2-friendly for now

import unittest
from typing import Any, Optional, Iterable, Dict, Collection, Tuple
from rdflib import StatementType
from rdflib.term import Node, URIRef
from rdflib.graph import ConjunctiveGraph


def quadsWithContextUris(quads: Any) -> None: ...

class Patch:
    def __init__(self,
                 jsonRepr: Optional[Any] = ...,
                 addQuads: Optional[Iterable[StatementType]] = ...,
                 delQuads: Optional[Iterable[StatementType]] = ...,
                 addGraph: Optional[ConjunctiveGraph] = ...,
                 delGraph: Optional[ConjunctiveGraph] = ...): ...
    def shortSummary(self) -> str: ...
    @classmethod
    def fromDiff(cls, oldGraph: ConjunctiveGraph, newGraph: ConjunctiveGraph) -> Patch: ...
    def __nonzero__(self) -> bool: ...
    @property
    def addQuads(self) -> Collection[StatementType]: ...
    @property
    def delQuads(self) -> Collection[StatementType]: ...
    @property
    def addGraph(self) -> ConjunctiveGraph: ...
    @property
    def delGraph(self) -> ConjunctiveGraph: ...
    @property
    def jsonRepr(self) -> str: ...
    def makeJsonRepr(self, extraAttrs: Optional[Dict]) -> str: ...
    def simplify(self) -> Patch: ...
    def concat(self, more: Iterable[Patch]) -> Patch: ...
    def getContext(self) -> URIRef: ...
    def isNoop(self) -> bool: ...