changeset 1870:51a9b23db357

rm stubs/rdfdb; point mypy to the real code instead Ignore-this: cd59283a21e2e593682e105d6507a462
author Drew Perttula <drewp@bigasterisk.com>
date Mon, 27 May 2019 00:41:38 +0000
parents 16af5a343e00
children 4ce991cdacdb
files stubs/rdfdb/__init__.pyi stubs/rdfdb/autodepgraphapi.pyi stubs/rdfdb/currentstategraphapi.pyi stubs/rdfdb/currentstategraphapi_test.pyi stubs/rdfdb/file_vs_uri.pyi stubs/rdfdb/grapheditapi.pyi stubs/rdfdb/graphfile.pyi stubs/rdfdb/graphfile_test.pyi stubs/rdfdb/localsyncedgraph.pyi stubs/rdfdb/mock_syncedgraph.pyi stubs/rdfdb/patch.pyi stubs/rdfdb/patchreceiver.pyi stubs/rdfdb/patchsender.pyi stubs/rdfdb/rdflibpatch.pyi stubs/rdfdb/rdflibpatch_literal.pyi stubs/rdfdb/service.pyi stubs/rdfdb/syncedgraph.pyi
diffstat 17 files changed, 0 insertions(+), 398 deletions(-) [+]
line wrap: on
line diff
--- a/stubs/rdfdb/__init__.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-# Stubs for rdfdb (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
--- a/stubs/rdfdb/autodepgraphapi.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-# Stubs for rdfdb.autodepgraphapi (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any, Callable, Optional, Set
-
-log: Any
-
-class AutoDepGraphApi:
-    currentFuncs: Any = ...
-    def __init__(self) -> None: ...
-    def addHandler(self, func: Any) -> None: ...
-    def runDepsOnNewPatch(self, p: Any) -> None: ...
-    def value(self, subject: Optional[Any] = ..., predicate: Any = ..., object: Optional[Any] = ..., default: Optional[Any] = ..., any: bool = ...): ...
-    def objects(self, subject: Optional[Any] = ..., predicate: Optional[Any] = ...): ...
-    def label(self, uri: Any): ...
-    def subjects(self, predicate: Optional[Any] = ..., object: Optional[Any] = ...): ...
-    def predicate_objects(self, subject: Any): ...
-    def items(self, listUri: Any) -> None: ...
-    def contains(self, triple: Any): ...
-    def contextsForStatement(self, triple: Any): ...
-HandlerSet = Set[Callable[[], None]]
-
-class _GraphWatchers:
-    def __init__(self) -> None: ...
-    def addSubjPredWatcher(self, func: Any, s: Any, p: Any) -> None: ...
-    def addPredObjWatcher(self, func: Any, p: Any, o: Any) -> None: ...
-    def addTripleWatcher(self, func: Any, triple: Any) -> None: ...
-    def addSubjectWatcher(self, func: Any, s: Any) -> None: ...
-    def whoCares(self, patch: Any): ...
-    def dependencies(self) -> None: ...
--- a/stubs/rdfdb/currentstategraphapi.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# Stubs for rdfdb.currentstategraphapi (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any, Optional
-
-log: Any
-
-class ReadOnlyConjunctiveGraph:
-    graph: Any = ...
-    def __init__(self, graph: Any) -> None: ...
-    def __getattr__(self, attr: Any): ...
-    def __len__(self): ...
-    def contextsForStatement(self, stmt: Any) -> None: ...
-
-class CurrentStateGraphApi:
-    def currentState(self, context: Optional[Any] = ..., tripleFilter: Any = ...): ...
-    def sequentialUri(self, prefix: Any): ...
-
-def contextsForStatementNoWildcards(g: Any, triple: Any): ...
--- a/stubs/rdfdb/currentstategraphapi_test.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# Stubs for rdfdb.currentstategraphapi_test (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import unittest
-
-class TestSequentialUri(unittest.TestCase):
-    def test_returnsSequentialUris(self) -> None: ...
--- a/stubs/rdfdb/file_vs_uri.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-# Stubs for rdfdb.file_vs_uri (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any
-
-def uriFromFile(dirUriMap: Any, filename: Any): ...
-def fileForUri(dirUriMap: Any, ctx: Any): ...
-def correctToTopdirPrefix(dirUriMap: Any, inFile: Any): ...
--- a/stubs/rdfdb/grapheditapi.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-# Stubs for rdfdb.grapheditapi (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import unittest
-from typing import Any
-
-log: Any
-
-class GraphEditApi:
-    def getObjectPatch(self, context: Any, subject: Any, predicate: Any, newObject: Any): ...
-    def patchObject(self, context: Any, subject: Any, predicate: Any, newObject: Any) -> None: ...
-    def patchSubgraph(self, context: Any, newGraph: Any): ...
-    def patchMapping(self, context: Any, subject: Any, predicate: Any, nodeClass: Any, keyPred: Any, valuePred: Any, newKey: Any, newValue: Any) -> None: ...
-    def removeMappingNode(self, context: Any, node: Any) -> None: ...
-
-class TestPatchSubgraph(unittest.TestCase):
-    def testCollapsesIdenticalQuads(self) -> None: ...
--- a/stubs/rdfdb/graphfile.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-# Stubs for rdfdb.graphfile (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any
-
-log: Any
-iolog: Any
-
-def patchN3SerializerToUseLessWhitespace(cutColumn: int = ...): ...
-
-class GraphFile:
-    lastWriteTimestamp: int = ...
-    globalPrefixes: Any = ...
-    ctxPrefixes: Any = ...
-    readPrefixes: Any = ...
-    flushDelay: int = ...
-    writeCall: Any = ...
-    notifier: Any = ...
-    def __init__(self, notifier: Any, path: Any, uri: Any, patch: Any, getSubgraph: Any, globalPrefixes: Any, ctxPrefixes: Any) -> None: ...
-    def addWatch(self) -> None: ...
-    def notify(self, notifier: Any, filepath: Any, mask: Any) -> None: ...
-    def fileGone(self) -> None: ...
-    def reread(self) -> None: ...
-    graphToWrite: Any = ...
-    def dirty(self, graph: Any) -> None: ...
-    def flush(self) -> None: ...
--- a/stubs/rdfdb/graphfile_test.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# Stubs for rdfdb.graphfile_test (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import unittest
-
-class TestGraphFileOutput(unittest.TestCase):
-    def testMaintainsN3PrefixesFromInput(self): ...
--- a/stubs/rdfdb/localsyncedgraph.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-# Stubs for rdfdb.localsyncedgraph (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from rdfdb.autodepgraphapi import AutoDepGraphApi
-from rdfdb.currentstategraphapi import CurrentStateGraphApi
-from rdfdb.grapheditapi import GraphEditApi
-from typing import Any, Optional
-
-class LocalSyncedGraph(CurrentStateGraphApi, AutoDepGraphApi, GraphEditApi):
-    def __init__(self, files: Optional[Any] = ...) -> None: ...
-    def patch(self, p: Any) -> None: ...
--- a/stubs/rdfdb/mock_syncedgraph.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-# Stubs for rdfdb.mock_syncedgraph (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any, Optional
-
-class MockSyncedGraph:
-    def __init__(self, n3Content: Any) -> None: ...
-    def addHandler(self, func: Any) -> None: ...
-    def value(self, subject: Optional[Any] = ..., predicate: Any = ..., object: Optional[Any] = ..., default: Optional[Any] = ..., any: bool = ...): ...
-    def objects(self, subject: Optional[Any] = ..., predicate: Optional[Any] = ...): ...
-    def label(self, uri: Any): ...
-    def subjects(self, predicate: Optional[Any] = ..., object: Optional[Any] = ...): ...
-    def predicate_objects(self, subject: Any): ...
-    def items(self, listUri: Any) -> None: ...
-    def contains(self, triple: Any): ...
--- a/stubs/rdfdb/patch.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-# Stubs for rdfdb.patch (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import unittest
-from typing import Any, Optional
-
-XSD: Any
-ALLSTMTS: Any
-
-def quadsWithContextUris(quads: Any) -> None: ...
-
-class Patch:
-    senderUpdateUri: Any = ...
-    def __init__(self, jsonRepr: Optional[Any] = ..., addQuads: Optional[Any] = ..., delQuads: Optional[Any] = ..., addGraph: Optional[Any] = ..., delGraph: Optional[Any] = ...) -> None: ...
-    def shortSummary(self): ...
-    @classmethod
-    def fromDiff(cls, oldGraph: Any, newGraph: Any): ...
-    def __bool__(self): ...
-    @property
-    def addQuads(self): ...
-    @property
-    def delQuads(self): ...
-    @property
-    def addGraph(self): ...
-    @property
-    def delGraph(self): ...
-    @property
-    def jsonRepr(self): ...
-    def makeJsonRepr(self, extraAttrs: Any = ...): ...
-    def simplify(self): ...
-    def concat(self, more: Any): ...
-    def getContext(self): ...
-    def isNoop(self): ...
-
-stmt1: Any
-
-class TestPatchFromDiff(unittest.TestCase):
-    def testEmpty(self) -> None: ...
-    def testNonEmpty(self) -> None: ...
-    def testNoticesAdds(self) -> None: ...
-    def testNoticesDels(self) -> None: ...
-    def testQuadSequenceOkInsteadOfGraph(self) -> None: ...
-
-class TestPatchGetContext(unittest.TestCase):
-    def testEmptyPatchCantGiveContext(self) -> None: ...
-    def testSimplePatchReturnsContext(self) -> None: ...
-    def testMultiContextPatchFailsToReturnContext(self) -> None: ...
--- a/stubs/rdfdb/patchreceiver.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-# Stubs for rdfdb.patchreceiver (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any
-
-log: Any
-
-class PatchReceiver:
-    rdfdbRoot: Any = ...
-    updateResource: Any = ...
-    def __init__(self, rdfdbRoot: Any, host: Any, label: Any, onPatch: Any) -> None: ...
-
-def makePatchEndpointPutMethod(cb: Any): ...
-def makePatchEndpoint(cb: Any): ...
--- a/stubs/rdfdb/patchsender.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-# Stubs for rdfdb.patchsender (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from typing import Any
-
-log: Any
-
-class PatchSender:
-    target: Any = ...
-    myUpdateResource: Any = ...
-    def __init__(self, target: Any, myUpdateResource: Any) -> None: ...
-    def sendPatch(self, p: Any): ...
-    def cancelAll(self) -> None: ...
-
-def sendPatch(putUri: Any, patch: Any, **kw: Any): ...
--- a/stubs/rdfdb/rdflibpatch.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-# Stubs for rdfdb.rdflibpatch (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import unittest
-from typing import Any
-
-def patchQuads(graph: Any, deleteQuads: Any, addQuads: Any, perfect: bool = ...) -> None: ...
-def fixContextToUri(spoc: Any): ...
-def inGraph(spoc: Any, graph: Any): ...
-def graphFromQuads(q: Any): ...
-def graphFromNQuad(text: Any): ...
-def serializeQuad(g: Any): ...
-def inContext(graph: Any, newContext: Any): ...
-def contextsForStatement(graph: Any, triple: Any): ...
-
-A: Any
-B: Any
-
-class TestInContext(unittest.TestCase):
-    def testResultHasQuads(self) -> None: ...
-
-class TestContextsForStatement(unittest.TestCase):
-    def testNotFound(self) -> None: ...
-    def testOneContext(self) -> None: ...
-    def testTwoContexts(self) -> None: ...
-
-class TestInGraph(unittest.TestCase):
-    def testSimpleMatch(self) -> None: ...
-    def testDontMatchDifferentStatement(self) -> None: ...
-    def testDontMatchStatementInAnotherContext(self) -> None: ...
-
-class TestGraphFromQuads(unittest.TestCase):
-    nqOut: str = ...
-    def testSerializes(self) -> None: ...
-    def testNquadParserSerializes(self) -> None: ...
-
-C: Any
-CTX1: Any
-CTX2: Any
-stmt1: Any
-stmt2: Any
-
-class TestPatchQuads(unittest.TestCase):
-    def testAddsToNewContext(self) -> None: ...
-    def testDeletes(self) -> None: ...
-    def testDeleteRunsBeforeAdd(self) -> None: ...
-    def testPerfectAddRejectsExistingStmt(self) -> None: ...
-    def testPerfectAddAllowsExistingStmtInNewContext(self) -> None: ...
-    def testPerfectDeleteRejectsAbsentStmt(self) -> None: ...
-    def testPerfectDeleteRejectsStmtFromOtherGraph(self) -> None: ...
-    def testPerfectDeleteAllowsRemovalOfStmtInMultipleContexts(self) -> None: ...
-    def testRedundantStmtOkForAddOrDelete(self) -> None: ...
--- a/stubs/rdfdb/rdflibpatch_literal.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# Stubs for rdfdb.rdflibpatch_literal (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import unittest
-
-def patch() -> None: ...
-
-class TestDoubleOutput(unittest.TestCase):
-    def testNoDanglingPoint(self) -> None: ...
--- a/stubs/rdfdb/service.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-# Stubs for rdfdb.service (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-import cyclone.websocket
-from typing import Any, Optional, Set
-
-log: Any
-
-class WebsocketDisconnect(ValueError): ...
-
-def sendGraphToClient(graph: Any, client: Any) -> None: ...
-
-class Client:
-    label: Any = ...
-    updateUri: Any = ...
-    def __init__(self, updateUri: bytes, label: Any) -> Any: ...
-    def sendPatch(self, p: Any): ...
-
-class WsClient:
-    updateUri: Any = ...
-    sendMessage: Any = ...
-    def __init__(self, connectionId: Any, sendMessage: Any) -> None: ...
-    def sendPatch(self, p: Any): ...
-
-class WatchedFiles:
-    dirUriMap: Any = ...
-    addlPrefixes: Any = ...
-    graphFiles: Any = ...
-    notifier: Any = ...
-    def __init__(self, dirUriMap: Any, patch: Any, getSubgraph: Any, addlPrefixes: Any) -> None: ...
-    initialLoad: bool = ...
-    def findAndLoadFiles(self) -> None: ...
-    def dirChange(self, watch: Any, path: Any, mask: Any) -> None: ...
-    def watchFile(self, inFile: Any) -> None: ...
-    def aboutToPatch(self, ctx: Any) -> None: ...
-    def dirtyFiles(self, ctxs: Any) -> None: ...
-
-class Db:
-    clients: Any = ...
-    graph: Any = ...
-    watchedFiles: Any = ...
-    def __init__(self, dirUriMap: Any, addlPrefixes: Any) -> None: ...
-    def patch(self, p: Any, dueToFileChange: bool = ...) -> None: ...
-    def clientErrored(self, err: Any, c: Any) -> None: ...
-    def summarizeToLog(self) -> None: ...
-    def getSubgraph(self, uri: Any): ...
-    def addClient(self, newClient: Any) -> None: ...
-    def sendClientsToAllLivePages(self) -> None: ...
-
-class GraphResource(cyclone.web.RequestHandler):
-    def get(self) -> None: ...
-
-class Patches(cyclone.web.RequestHandler):
-    put: Any = ...
-    def __init__(self, *args: Any, **kw: Any) -> None: ...
-    def get(self) -> None: ...
-
-class GraphClients(cyclone.web.RequestHandler):
-    def get(self) -> None: ...
-    def post(self) -> None: ...
-
-class Prefixes(cyclone.web.RequestHandler):
-    def post(self) -> None: ...
-
-class WebsocketClient(cyclone.websocket.WebSocketHandler):
-    wsClient: Any = ...
-    def connectionMade(self, *args: Any, **kwargs: Any) -> None: ...
-    def connectionLost(self, reason: Any) -> None: ...
-    def messageReceived(self, message: Any) -> None: ...
-
-class Live(cyclone.websocket.WebSocketHandler):
-    def connectionMade(self, *args: Any, **kwargs: Any) -> None: ...
-    def connectionLost(self, reason: Any) -> None: ...
-    def messageReceived(self, message: Any) -> None: ...
-
-liveClients: Set[Live]
-
-def sendToLiveClients(d: Optional[Any] = ..., asJson: Optional[Any] = ...) -> None: ...
-
-class NoExts(cyclone.web.StaticFileHandler):
-    def get(self, path: Any, *args: Any, **kw: Any) -> None: ...
-
-def main(dirUriMap: Optional[Any] = ..., prefixes: Optional[Any] = ..., port: int = ...) -> None: ...
--- a/stubs/rdfdb/syncedgraph.pyi	Sun May 26 22:42:56 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# Stubs for rdfdb.syncedgraph (Python 3)
-#
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
-
-from rdfdb.autodepgraphapi import AutoDepGraphApi
-from rdfdb.currentstategraphapi import CurrentStateGraphApi
-from rdfdb.grapheditapi import GraphEditApi
-from typing import Any, Optional
-
-log: Any
-
-class SyncedGraph(CurrentStateGraphApi, AutoDepGraphApi, GraphEditApi):
-    rdfdbRoot: Any = ...
-    initiallySynced: Any = ...
-    def __init__(self, rdfdbRoot: Any, label: Any, receiverHost: Optional[Any] = ...) -> None: ...
-    def resync(self): ...
-    def patch(self, p: Any) -> None: ...
-    def suggestPrefixes(self, ctx: Any, prefixes: Any) -> None: ...
-    def sendFailed(self, result: Any) -> None: ...