changeset 1253:0e7044b23dad

more stubs for collector typechecking Ignore-this: 7151f942cfc29c2b3dfaa0a6b20222aa darcs-hash:47577255eba6b501a19b06231945ae090c05f8fd
author drewp <drewp@bigasterisk.com>
date Fri, 19 Apr 2019 01:07:29 -0700
parents 9cfa7f69e41f
children 666f9a2198a7
files service/collector/stubs/greplin/scales/__init__.pyi service/collector/stubs/greplin/scales/aggregation.pyi service/collector/stubs/greplin/scales/aggregation_test.pyi service/collector/stubs/greplin/scales/bottlehandler.pyi service/collector/stubs/greplin/scales/clock.pyi service/collector/stubs/greplin/scales/cyclonehandler.pyi service/collector/stubs/greplin/scales/formats.pyi service/collector/stubs/greplin/scales/formats_test.pyi service/collector/stubs/greplin/scales/graphite.pyi service/collector/stubs/greplin/scales/loop.pyi service/collector/stubs/greplin/scales/meter.pyi service/collector/stubs/greplin/scales/samplestats.pyi service/collector/stubs/greplin/scales/samplestats_test.pyi service/collector/stubs/greplin/scales/scales_test.pyi service/collector/stubs/greplin/scales/timer.pyi service/collector/stubs/greplin/scales/tornadolike.pyi service/collector/stubs/greplin/scales/twistedweb.pyi service/collector/stubs/greplin/scales/util.pyi service/collector/stubs/greplin/scales/util_test.pyi service/collector/stubs/rdfdb/__init__.py service/collector/stubs/rdfdb/patch.pyi service/collector/stubs/rdflib/__init__.pyi service/collector/stubs/rdflib/graph.pyi service/collector/stubs/rdflib/term.pyi service/collector/stubs/twisted/__init__.pyi service/collector/stubs/twisted/internet.pyi
diffstat 25 files changed, 706 insertions(+), 86 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/__init__.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,149 @@
+# Stubs for greplin.scales (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import json
+from collections import UserDict
+from typing import Any, Optional
+
+ID_KEY: str
+NEXT_ID: Any
+
+def statsId(obj: Any): ...
+def init(obj: Any, context: Optional[Any] = ...): ...
+def initChild(obj: Any, name: Any): ...
+def initChildOfType(obj: Any, name: Any, subContext: Optional[Any] = ...): ...
+def reset() -> None: ...
+def getStats(): ...
+def setCollapsed(path: Any): ...
+
+class StatContainer(UserDict):
+    def __init__(self) -> None: ...
+    def setCollapsed(self, isCollapsed: Any) -> None: ...
+    def isCollapsed(self): ...
+
+class _Stats:
+    stats: Any = ...
+    parentMap: Any = ...
+    containerMap: Any = ...
+    subId: int = ...
+    @classmethod
+    def reset(cls) -> None: ...
+    @classmethod
+    def init(cls, obj: Any, context: Any): ...
+    @classmethod
+    def initChild(cls, obj: Any, name: Any, subContext: Any, parent: Optional[Any] = ...): ...
+    @classmethod
+    def getContainerForObject(cls, instanceId: Any): ...
+    @classmethod
+    def getStat(cls, obj: Any, name: Any): ...
+    @classmethod
+    def getAggregator(cls, instanceId: Any, name: Any): ...
+    @classmethod
+    def setCollapsed(cls, path: Any) -> None: ...
+
+class Stat:
+    def __init__(self, name: Any, value: str = ..., logger: Optional[Any] = ...) -> None: ...
+    def getName(self): ...
+    def __get__(self, instance: Any, _: Any): ...
+    def __set__(self, instance: Any, value: Any) -> None: ...
+    def updateItem(self, instance: Any, subKey: Any, value: Any) -> None: ...
+    def logger(self, logger: Any): ...
+
+class IntStat(Stat):
+    def __init__(self, name: Any, value: int = ...) -> None: ...
+
+class DoubleStat(Stat):
+    def __init__(self, name: Any, value: float = ...) -> None: ...
+
+class IntDict(UserDict):
+    parent: Any = ...
+    instance: Any = ...
+    autoDelete: Any = ...
+    def __init__(self, parent: Any, instance: Any, autoDelete: bool = ...) -> None: ...
+    def __getitem__(self, item: Any): ...
+    def __setitem__(self, key: Any, value: Any) -> None: ...
+
+class IntDictStat(Stat):
+    autoDelete: Any = ...
+    def __init__(self, name: Any, autoDelete: bool = ...) -> None: ...
+
+class StringDict(UserDict):
+    parent: Any = ...
+    instance: Any = ...
+    def __init__(self, parent: Any, instance: Any) -> None: ...
+    def __getitem__(self, item: Any): ...
+    def __setitem__(self, key: Any, value: Any) -> None: ...
+
+class StringDictStat(Stat): ...
+
+class AggregationStat(Stat):
+    def __init__(self, name: Any, value: Any) -> None: ...
+    def update(self, instance: Any, oldValue: Any, newValue: Any) -> None: ...
+
+class ChildAggregationStat(Stat):
+    def __init__(self, name: Any, value: Any) -> None: ...
+    def update(self, instance: Any, oldValue: Any, newValue: Any, subKey: Any) -> None: ...
+
+class SumAggregationStat(AggregationStat):
+    def __init__(self, name: Any) -> None: ...
+    def update(self, instance: Any, oldValue: Any, newValue: Any) -> None: ...
+
+class HistogramAggregationStat(AggregationStat):
+    autoDelete: Any = ...
+    def __init__(self, name: Any, autoDelete: bool = ...) -> None: ...
+    def update(self, instance: Any, oldValue: Any, newValue: Any) -> None: ...
+
+class IntDictSumAggregationStat(ChildAggregationStat):
+    def __init__(self, name: Any) -> None: ...
+    def update(self, instance: Any, oldValue: Any, newValue: Any, subKey: Any) -> None: ...
+
+class PmfStatDict(UserDict):
+    class TimeManager:
+        container: Any = ...
+        msg99: Any = ...
+        start: Any = ...
+        def __init__(self, container: Any) -> None: ...
+        def __enter__(self): ...
+        def __exit__(self, *_: Any) -> None: ...
+        def warn99(self, logger: Any, msg: Any, *args: Any) -> None: ...
+        def discard(self) -> None: ...
+        def __call__(self, func: Any): ...
+    percentile99: Any = ...
+    def __init__(self, sample: Optional[Any] = ...) -> None: ...
+    def __getitem__(self, item: Any): ...
+    def addValue(self, value: Any) -> None: ...
+    def time(self): ...
+
+class PmfStat(Stat):
+    def __init__(self, name: Any, _: Optional[Any] = ...) -> None: ...
+    def __set__(self, instance: Any, value: Any) -> None: ...
+
+class NamedPmfDict(UserDict):
+    def __init__(self) -> None: ...
+    def __getitem__(self, item: Any): ...
+    def __setitem__(self, key: Any, value: Any) -> None: ...
+
+class NamedPmfDictStat(Stat): ...
+
+class StateTimeStatDict(UserDict):
+    parent: Any = ...
+    instance: Any = ...
+    def __init__(self, parent: Any, instance: Any) -> None: ...
+    def __getitem__(self, item: Any): ...
+    def incr(self, item: Any, value: Any) -> None: ...
+    def acquire(self) -> None: ...
+
+class StateTimeStat(Stat):
+    state: int = ...
+    time: Any = ...
+    def __init__(self, name: Any, _: Optional[Any] = ...) -> None: ...
+    def __set__(self, instance: Any, value: Any) -> None: ...
+
+def filterCollapsedItems(data: Any): ...
+
+class StatContainerEncoder(json.JSONEncoder):
+    def default(self, obj: Any): ...
+
+def dumpStatsTo(filename: Any) -> None: ...
+def collection(path: Any, *stats: Any): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/aggregation.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,91 @@
+# Stubs for greplin.scales.aggregation (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any, Optional
+
+class DefaultFormat:
+    def getCount(self, data: Any): ...
+    def getValue(self, data: Any): ...
+
+class DirectFormat:
+    def getCount(self, _: Any): ...
+    def getValue(self, data: Any): ...
+
+class TimerFormat:
+    def getCount(self, data: Any): ...
+    def getValue(self, data: Any): ...
+
+class TimerMeanFormat:
+    def getCount(self, data: Any): ...
+    def getValue(self, data: Any): ...
+
+class CounterFormat:
+    def getCount(self, data: Any): ...
+    def getValue(self, data: Any): ...
+
+class MeterFormat:
+    def getCount(self, data: Any): ...
+    def getValue(self, data: Any): ...
+
+class GaugeFormat:
+    def getValue(self, data: Any): ...
+
+class DataFormats:
+    DEFAULT: Any = ...
+    DIRECT: Any = ...
+    TIMER: Any = ...
+    TIMER_MEAN: Any = ...
+    COUNTER: Any = ...
+    METER: Any = ...
+    GAUGE: Any = ...
+
+class Aggregator:
+    name: Any = ...
+    def __init__(self, name: Optional[Any] = ..., dataFormat: Any = ...) -> None: ...
+    def clone(self): ...
+
+class Average(Aggregator):
+    DEFAULT_NAME: str = ...
+    def addValue(self, _: Any, value: Any) -> None: ...
+    def result(self): ...
+
+class Sum(Aggregator):
+    DEFAULT_NAME: str = ...
+    total: int = ...
+    def addValue(self, _: Any, value: Any) -> None: ...
+    def result(self): ...
+
+class InverseMap(Aggregator):
+    DEFAULT_NAME: str = ...
+    def __init__(self, *args: Any, **kw: Any) -> None: ...
+    def addValue(self, source: Any, data: Any) -> None: ...
+    def result(self): ...
+
+class Sorted(Aggregator):
+    DEFAULT_NAME: str = ...
+    def __init__(self, cmp: Optional[Any] = ..., key: Optional[Any] = ..., reverse: bool = ..., *args: Any, **kw: Any) -> None: ...
+    def addValue(self, source: Any, data: Any) -> None: ...
+    def result(self): ...
+    def clone(self): ...
+
+class Highlight(Aggregator):
+    value: Any = ...
+    source: Any = ...
+    fn: Any = ...
+    def __init__(self, name: Any, fn: Any, dataFormat: Any = ...) -> None: ...
+    def addValue(self, source: Any, value: Any) -> None: ...
+    def result(self): ...
+    def clone(self): ...
+
+class Aggregation:
+    def __init__(self, aggregators: Any) -> None: ...
+    def addSource(self, source: Any, data: Any) -> None: ...
+    def addJsonDirectory(self, directory: Any, test: Optional[Any] = ...) -> None: ...
+    def result(self, root: Optional[Any] = ...): ...
+
+class FileInclusionTest:
+    ignoreByName: Any = ...
+    maxAge: Any = ...
+    def __init__(self, ignoreByName: Optional[Any] = ..., maxAge: Optional[Any] = ...) -> None: ...
+    def __call__(self, _: Any, fullPath: Any): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/aggregation_test.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,9 @@
+# Stubs for greplin.scales.aggregation_test (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import unittest
+
+class AggregationTest(unittest.TestCase):
+    def testNoData(self) -> None: ...
+    def testRegex(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/bottlehandler.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,8 @@
+# Stubs for greplin.scales.bottlehandler (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any
+
+def bottlestats(server_name: Any, path: str = ...): ...
+def register_stats_handler(app: Any, server_name: Any, prefix: str = ...) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/clock.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,8 @@
+# Stubs for greplin.scales.clock (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+class BasicClock:
+    def time(self): ...
+
+def getClock(): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/cyclonehandler.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,8 @@
+# Stubs for greplin.scales.cyclonehandler (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import cyclone.web
+from greplin.scales import tornadolike
+
+class StatsHandler(tornadolike.Handler, cyclone.web.RequestHandler): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/formats.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,13 @@
+# Stubs for greplin.scales.formats (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any, Optional
+
+OPERATORS: Any
+OPERATOR: Any
+
+def runQuery(statDict: Any, query: Any): ...
+def htmlHeader(output: Any, path: Any, serverName: Any, query: Optional[Any] = ...) -> None: ...
+def htmlFormat(output: Any, pathParts: Any = ..., statDict: Optional[Any] = ..., query: Optional[Any] = ...) -> None: ...
+def jsonFormat(output: Any, statDict: Optional[Any] = ..., query: Optional[Any] = ..., pretty: bool = ...) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/formats_test.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,24 @@
+# Stubs for greplin.scales.formats_test (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import unittest
+from typing import Any
+
+class Root:
+    def __init__(self) -> None: ...
+    def getChild(self, name: Any, collapsed: Any): ...
+
+class Child:
+    countStat: Any = ...
+    def __init__(self, name: Any, collapsed: Any) -> None: ...
+
+class StatsTest(unittest.TestCase):
+    def setUp(self) -> None: ...
+    def testJsonCollapse(self) -> None: ...
+
+class UnicodeFormatTest(unittest.TestCase):
+    UNICODE_VALUE: Any = ...
+    def testHtmlFormat(self) -> None: ...
+    def testJsonFormat(self) -> None: ...
+    def testJsonFormatBinaryGarbage(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/graphite.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,25 @@
+# Stubs for greplin.scales.graphite (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import threading
+from typing import Any, Optional
+
+log: Any
+
+class GraphitePusher:
+    rules: Any = ...
+    pruneRules: Any = ...
+    prefix: Any = ...
+    graphite: Any = ...
+    def __init__(self, host: Any, port: Any, prefix: Optional[Any] = ...) -> None: ...
+    def push(self, statsDict: Optional[Any] = ..., prefix: Optional[Any] = ..., path: Optional[Any] = ...) -> None: ...
+    def allow(self, rule: Any) -> None: ...
+    def forbid(self, rule: Any) -> None: ...
+    def prune(self, rule: Any) -> None: ...
+
+class GraphitePeriodicPusher(threading.Thread, GraphitePusher):
+    daemon: bool = ...
+    period: Any = ...
+    def __init__(self, host: Any, port: Any, prefix: Optional[Any] = ..., period: int = ...) -> None: ...
+    def run(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/loop.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,7 @@
+# Stubs for greplin.scales.loop (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any
+
+def installStatsLoop(statsFile: Any, statsDelay: Any) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/meter.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,28 @@
+# Stubs for greplin.scales.meter (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from collections import UserDict
+from greplin.scales import Stat
+from typing import Any, Optional
+
+TICKERS: Any
+TICKER_THREAD: Any
+
+class MeterStatDict(UserDict):
+    def __init__(self) -> None: ...
+    def __getitem__(self, item: Any): ...
+    def tick(self) -> None: ...
+    def mark(self, value: int = ...) -> None: ...
+
+class MeterStat(Stat):
+    def __init__(self, name: Any, _: Optional[Any] = ...) -> None: ...
+    def __set__(self, instance: Any, value: Any) -> None: ...
+
+class MeterDict(UserDict):
+    parent: Any = ...
+    instance: Any = ...
+    def __init__(self, parent: Any, instance: Any) -> None: ...
+    def __getitem__(self, item: Any): ...
+
+class MeterDictStat(Stat): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/samplestats.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,47 @@
+# Stubs for greplin.scales.samplestats (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from .clock import getClock
+from typing import Any
+
+class Sampler:
+    min: Any = ...
+    max: Any = ...
+    def __init__(self) -> None: ...
+    def __len__(self): ...
+    def samples(self): ...
+    def update(self, value: Any) -> None: ...
+    @property
+    def mean(self): ...
+    @property
+    def stddev(self): ...
+    def percentiles(self, percentiles: Any): ...
+
+class ExponentiallyDecayingReservoir(Sampler):
+    DEFAULT_SIZE: int = ...
+    DEFAULT_ALPHA: float = ...
+    DEFAULT_RESCALE_THRESHOLD: int = ...
+    values: Any = ...
+    alpha: Any = ...
+    size: Any = ...
+    clock: Any = ...
+    rescale_threshold: Any = ...
+    count: int = ...
+    startTime: Any = ...
+    nextScaleTime: Any = ...
+    def __init__(self, size: Any = ..., alpha: Any = ..., rescale_threshold: Any = ..., clock: Any = ...) -> None: ...
+    def __len__(self): ...
+    def clear(self) -> None: ...
+    def update(self, value: Any) -> None: ...
+    def samples(self): ...
+
+class UniformSample(Sampler):
+    sample: Any = ...
+    count: int = ...
+    def __init__(self) -> None: ...
+    def clear(self) -> None: ...
+    def __len__(self): ...
+    def update(self, value: Any) -> None: ...
+    def __iter__(self): ...
+    def samples(self): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/samplestats_test.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,12 @@
+# Stubs for greplin.scales.samplestats_test (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import unittest
+
+class UniformSampleTest(unittest.TestCase):
+    def testGaussian(self) -> None: ...
+
+class ExponentiallyDecayingReservoirTest(unittest.TestCase):
+    def testGaussian(self) -> None: ...
+    def testWithRescale(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/scales_test.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,55 @@
+# Stubs for greplin.scales.scales_test (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import unittest
+from typing import Any
+
+class Root1:
+    stateStat: Any = ...
+    errorsStat: Any = ...
+    activeUrlsStat: Any = ...
+    def __init__(self) -> None: ...
+    def getChild(self, cls: Any, *args: Any): ...
+
+class Root2:
+    def __init__(self) -> None: ...
+    def getChild(self, cls: Any): ...
+
+class AggregatingRoot:
+    countStat: Any = ...
+    stateStat: Any = ...
+    errorsStat: Any = ...
+    def __init__(self) -> None: ...
+    def getChild(self, cls: Any, *args: Any): ...
+
+class AggregatingRootSubclass(AggregatingRoot): ...
+
+class TypedChild:
+    countStat: Any = ...
+    def __init__(self) -> None: ...
+
+class Child:
+    countStat: Any = ...
+    stateStat: Any = ...
+    errorsStat: Any = ...
+    def __init__(self, name: str = ...) -> None: ...
+
+class DynamicRoot:
+    value: int = ...
+    dynamicStat: Any = ...
+    def __init__(self) -> None: ...
+
+class StatsTest(unittest.TestCase):
+    def setUp(self) -> None: ...
+    def testChildTypeStats(self) -> None: ...
+    def testChildStats(self) -> None: ...
+    def testMultilevelChild(self) -> None: ...
+    def testStatSum(self) -> None: ...
+    def testStatSumWithSubclassRoot(self) -> None: ...
+    def helpTestStatSum(self, a: Any) -> None: ...
+    def testStatHistogram(self) -> None: ...
+    def testIntDictStats(self) -> None: ...
+    def testIntDictStatsAggregation(self) -> None: ...
+    def testDynamic(self) -> None: ...
+    def testCollection(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/timer.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,7 @@
+# Stubs for greplin.scales.timer (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any
+
+def RepeatTimer(interval: Any, function: Any, iterations: int = ..., *args: Any, **kwargs: Any): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/tornadolike.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,10 @@
+# Stubs for greplin.scales.tornadolike (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any
+
+class Handler:
+    serverName: Any = ...
+    def initialize(self, serverName: Any) -> None: ...
+    def get(self, path: Any) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/twistedweb.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,12 @@
+# Stubs for greplin.scales.twistedweb (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from twisted.web import resource
+from typing import Any
+
+class StatsResource(resource.Resource):
+    isLeaf: bool = ...
+    serverName: Any = ...
+    def __init__(self, serverName: Any) -> None: ...
+    def render_GET(self, request: Any): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/util.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,50 @@
+# Stubs for greplin.scales.util (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import threading
+from typing import Any, Optional
+
+log: Any
+
+def lookup(source: Any, keys: Any, fallback: Optional[Any] = ...): ...
+
+class GraphiteReporter(threading.Thread):
+    sock: Any = ...
+    queue: Any = ...
+    maxQueueSize: Any = ...
+    daemon: bool = ...
+    def __init__(self, host: Any, port: Any, maxQueueSize: int = ...) -> None: ...
+    def run(self) -> None: ...
+    def connect(self) -> None: ...
+    def disconnect(self) -> None: ...
+    def log(self, name: Any, value: Any, valueType: Optional[Any] = ..., stamp: Optional[Any] = ...) -> None: ...
+    def enqueue(self, name: Any, value: Any, valueType: Optional[Any] = ..., stamp: Optional[Any] = ...) -> None: ...
+    def flush(self) -> None: ...
+    def shutdown(self) -> None: ...
+
+class AtomicValue:
+    lock: Any = ...
+    value: Any = ...
+    def __init__(self, val: Any) -> None: ...
+    def update(self, function: Any): ...
+    def getAndSet(self, newVal: Any): ...
+    def addAndGet(self, val: Any): ...
+
+class EWMA:
+    M1_ALPHA: Any = ...
+    M5_ALPHA: Any = ...
+    M15_ALPHA: Any = ...
+    TICK_RATE: int = ...
+    @classmethod
+    def oneMinute(cls): ...
+    @classmethod
+    def fiveMinute(cls): ...
+    @classmethod
+    def fifteenMinute(cls): ...
+    alpha: Any = ...
+    interval: Any = ...
+    rate: int = ...
+    def __init__(self, alpha: Any, interval: Any) -> None: ...
+    def update(self, val: Any) -> None: ...
+    def tick(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/greplin/scales/util_test.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,10 @@
+# Stubs for greplin.scales.util_test (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import unittest
+
+class AtomicValueTest(unittest.TestCase):
+    def testUpdate(self) -> None: ...
+    def testGetAndSet(self) -> None: ...
+    def testAddAndGet(self) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/rdfdb/patch.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,40 @@
+# 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: ...
--- a/service/collector/stubs/rdflib/__init__.pyi	Thu Apr 18 22:00:06 2019 -0700
+++ b/service/collector/stubs/rdflib/__init__.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -1,9 +1,22 @@
 # Stubs for rdflib (Python 3.4)
 #
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
+from typing import Tuple, Union
 
-from rdflib.term import URIRef, BNode, Literal, Variable
-from rdflib.namespace import Namespace
-from rdflib.graph import  Dataset, Graph, ConjunctiveGraph
+
 from rdflib.namespace import RDF, RDFS, OWL, XSD
 
+# this is the 1st way that worked. 'from rdflib.term import URIRef' did not work.
+import rdflib.namespace as _n
+Namespace = _n.Namespace
+
+import rdflib.term as _t
+URIRef = _t.URIRef
+Literal = _t.Literal
+BNode = _t.BNode
+
+import rdflib.graph as _g
+ConjunctiveGraph = _g.ConjunctiveGraph
+Graph = _g.Graph
+
+# not part of rdflib
+StatementType = Tuple[Union[URIRef, BNode], URIRef, _t.Node, URIRef]
--- a/service/collector/stubs/rdflib/graph.pyi	Thu Apr 18 22:00:06 2019 -0700
+++ b/service/collector/stubs/rdflib/graph.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -1,17 +1,20 @@
 # Stubs for rdflib.graph (Python 3.4)
 #
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
 
-from typing import Any, Optional, Tuple, Sequence
+from typing import Any, Optional, Tuple, Sequence, Iterable
 from io import StringIO as BytesIO
-from rdflib.term import Node
+from rdflib import StatementType
+from rdflib.term import Node, URIRef
 
-class Graph(Node):
+# real Graph is a subclass of Node, but I have bugs where the context
+# in a statement is the wrong one of Graph or URIRef, so I want that to be more clear.
+class Graph:
     context_aware = ...  # type: Any
     formula_aware = ...  # type: Any
-    def __init__(self, store='', identifier=None, namespace_manager=None): ...
+    def __init__(self, store='', identifier: Optional[URIRef]=None, namespace_manager=None): ...
     store = ...  # type: Any
-    identifier = ...  # type: Any
+    identifier: URIRef = ... 
     namespace_manager = ...  # type: Any
     def toPython(self): ...
     def destroy(self, configuration): ...
@@ -20,7 +23,7 @@
     def open(self, configuration, create=False): ...
     def close(self, commit_pending_transaction=False): ...
     def add(self, xxx_todo_changeme): ...
-    def addN(self, quads): ...
+    def addN(self, quads: Iterable[StatementType]): ...
     def remove(self, xxx_todo_changeme1): ...
     def triples(self, xxx_todo_changeme2) -> Sequence[Tuple[Node, Node, Node]]: ...
     def __getitem__(self, item): ...
@@ -85,10 +88,10 @@
     def __init__(self, store='', identifier=None): ...
     def __contains__(self, triple_or_quad): ...
     def add(self, xxx_todo_changeme4): ...
-    def addN(self, quads): ...
+    def addN(self, quads: Iterable[StatementType]): ...
     def remove(self, xxx_todo_changeme5): ...
     def triples(self, xxx_todo_changeme6, context=None): ...
-    def quads(self, pattern=None): ...
+    def quads(self, pattern=None) -> Iterable[StatementType]: ...
     def triples_choices(self, xxx_todo_changeme7): ...
     def __len__(self): ...
     def contexts(self, triple=None): ...
@@ -130,26 +133,6 @@
     def __len__(self): ...
     def __getitem__(self, index): ...
 
-class BackwardCompatGraph(ConjunctiveGraph):
-    def __init__(self, backend=''): ...
-    backend = ...  # type: Any
-    def open(self, configuration, create=True): ...
-    def add(self, xxx_todo_changeme9, context=None): ...
-    def remove(self, xxx_todo_changeme10, context=None): ...
-    def triples(self, xxx_todo_changeme11, context=None): ...
-    def __len__(self, context=None): ...
-    def get_context(self, identifier, quoted=False): ...
-    def remove_context(self, context): ...
-    def contexts(self, triple=None): ...
-    def subjects(self, predicate=None, object=None, context=None): ...
-    def predicates(self, subject=None, object=None, context=None): ...
-    def objects(self, subject=None, predicate=None, context=None): ...
-    def subject_predicates(self, object=None, context=None): ...
-    def subject_objects(self, predicate=None, context=None): ...
-    def predicate_objects(self, subject=None, context=None): ...
-    def __reduce__(self): ...
-    def save(self, destination, format='', base=None, encoding=None): ...
-
 class ModificationException(Exception):
     def __init__(self): ...
 
--- a/service/collector/stubs/rdflib/term.pyi	Thu Apr 18 22:00:06 2019 -0700
+++ b/service/collector/stubs/rdflib/term.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -1,53 +1,46 @@
-# Stubs for rdflib.term (Python 3.4)
+# Stubs for rdflib.term (Python 3)
 #
-# NOTE: This dynamically typed stub was automatically generated by stubgen.
 
-from typing import Any, Union
-import datetime
-from decimal import Decimal
+from typing import Any, Optional
 
 class Node: ...
 
 class Identifier(Node, str):
-    def __new__(cls, value): ...
-    def eq(self, other): ...
-    def neq(self, other): ...
-    def __ne__(self, other): ...
-    def __eq__(self, other): ...
-    def __gt__(self, other): ...
-    def __lt__(self, other): ...
-    def __le__(self, other): ...
-    def __ge__(self, other): ...
+    def __new__(cls, value: Any): ...
+    def eq(self, other: Any): ...
+    def neq(self, other: Any): ...
+    def __ne__(self, other: Any): ...
+    def __eq__(self, other: Any): ...
+    def __gt__(self, other: Any): ...
+    def __lt__(self, other: Any): ...
+    def __le__(self, other: Any): ...
+    def __ge__(self, other: Any): ...
     def __hash__(self): ...
 
 class URIRef(Identifier):
-    def __new__(cls, value, base=None): ...
-    def toPython(self) -> str: ...
-    def n3(self, namespace_manager=None) -> bytes: ...
+    def __new__(cls, value: Any, base: Optional[Any] = ...): ...
+    def toPython(self): ...
+    def n3(self, namespace_manager: Optional[Any] = ...): ...
     def defrag(self): ...
     def __reduce__(self): ...
     def __getnewargs__(self): ...
-    def __add__(self, other): ...
-    def __radd__(self, other): ...
-    def __mod__(self, other): ...
+    def __add__(self, other: Any): ...
+    def __radd__(self, other: Any): ...
+    def __mod__(self, other: Any): ...
     def md5_term_hash(self): ...
     def de_skolemize(self): ...
 
-class Genid(URIRef): ...
-class RDFLibGenid(Genid): ...
-
 class BNode(Identifier):
-    def __new__(cls, value=None, _sn_gen=..., _prefix=...): ...
-    def toPython(self) -> str: ...
-    def n3(self, namespace_manager=None) -> bytes: ...
+    def __new__(cls, value: Optional[Any] = ..., _sn_gen: Any = ..., _prefix: Any = ...): ...
+    def toPython(self): ...
+    def n3(self, namespace_manager: Optional[Any] = ...): ...
     def __getnewargs__(self): ...
     def __reduce__(self): ...
     def md5_term_hash(self): ...
-    def skolemize(self, authority=''): ...
+    def skolemize(self, authority: str = ...): ...
 
 class Literal(Identifier):
-    __doc__ = ...  # type: Any
-    def __new__(cls, lexical_or_value, lang=None, datatype=None, normalize=None): ...
+    def __new__(cls, lexical_or_value: Any, lang: Optional[Any] = ..., datatype: Optional[Any] = ..., normalize: Optional[Any] = ...): ...
     def normalize(self): ...
     @property
     def value(self): ...
@@ -56,35 +49,22 @@
     @property
     def datatype(self): ...
     def __reduce__(self): ...
-    def __add__(self, val): ...
+    def __add__(self, val: Any): ...
     def __bool__(self): ...
     def __neg__(self): ...
     def __pos__(self): ...
     def __abs__(self): ...
     def __invert__(self): ...
-    def __gt__(self, other): ...
-    def __lt__(self, other): ...
-    def __le__(self, other): ...
-    def __ge__(self, other): ...
+    def __gt__(self, other: Any): ...
+    def __lt__(self, other: Any): ...
+    def __le__(self, other: Any): ...
+    def __ge__(self, other: Any): ...
     def __hash__(self): ...
-    def __eq__(self, other): ...
-    def eq(self, other): ...
-    def neq(self, other): ...
-    def n3(self, namespace_manager=None) -> bytes: ...
-    # Literal has many converters:
-    def toPython(self) -> Union[Literal, str, int, float, bytes, bool, Decimal, datetime.datetime, datetime.date, datetime.time]: ...
+    def __eq__(self, other: Any): ...
+    def eq(self, other: Any): ...
+    def neq(self, other: Any): ...
+    def n3(self, namespace_manager: Optional[Any] = ...): ...
+    def toPython(self): ...
     def md5_term_hash(self): ...
 
-def bind(datatype, pythontype, constructor=None, lexicalizer=None): ...
-
-class Variable(Identifier):
-    def __new__(cls, value): ...
-    def toPython(self): ...
-    def n3(self, namespace_manager=None) -> bytes: ...
-    def __reduce__(self): ...
-    def md5_term_hash(self): ...
-
-class Statement(Node, tuple):
-    def __new__(cls, xxx_todo_changeme, context): ...
-    def __reduce__(self): ...
-    def toPython(self): ...
+def bind(datatype: Any, pythontype: Any, constructor: Optional[Any] = ..., lexicalizer: Optional[Any] = ...) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/twisted/__init__.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/collector/stubs/twisted/internet.pyi	Fri Apr 19 01:07:29 2019 -0700
@@ -0,0 +1,30 @@
+from typing import Any, Optional
+
+class IDelayedCall:
+    def getTime(self) -> Any: ...
+    def cancel(self) -> None: ...
+    def delay(self, secondsLater: Any) -> None: ...
+    def reset(self, secondsFromNow: Any) -> None: ...
+    def active(self) -> None: ...
+    
+
+class ReactorType: # abridged
+    def listenTCP(self, port: Any, factory: Any, backlog: int = ..., interface: str = ...) -> None: ...
+    def seconds(self) -> None: ...
+    def callLater(self, delay: Any, callable: Any, *args: Any, **kw: Any) -> IDelayedCall: ...
+    def getDelayedCalls(self) -> None: ...
+    def callFromThread(self, callable: Any, *args: Any, **kw: Any) -> None: ...
+    def callInThread(self, callable: Any, *args: Any, **kwargs: Any) -> None: ...
+    running: Any = ...
+    def resolve(self, name: Any, timeout: int = ...) -> None: ...
+    def run(self) -> None: ...
+    def stop(self) -> None: ...
+    def crash(self) -> None: ...
+    def iterate(self, delay: int = ...) -> None: ...
+    def fireSystemEvent(self, eventType: Any) -> None: ...
+    def addSystemEventTrigger(self, phase: Any, eventType: Any, callable: Any, *args: Any, **kw: Any) -> None: ...
+    def removeSystemEventTrigger(self, triggerID: Any) -> None: ...
+    def callWhenRunning(self, callable: Any, *args: Any, **kw: Any) -> None: ...
+    
+
+reactor = ReactorType()