changeset 53:a21b87140758

more stubs Ignore-this: ff80b18a86305d43128277f5db0248b5
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 30 May 2019 08:15:10 +0000
parents c81bd512d587
children a47c135b58b8
files stubs/cyclone/httpserver.pyi stubs/cyclone/web.pyi stubs/cyclone/websocket.pyi stubs/greplin/__init__.pyi stubs/greplin/scales/__init__.pyi stubs/scales/__init__.pyi stubs/scales/aggregation.pyi stubs/scales/aggregation_test.pyi stubs/scales/bottlehandler.pyi stubs/scales/clock.pyi stubs/scales/cyclonehandler.pyi stubs/scales/flaskhandler.pyi stubs/scales/formats.pyi stubs/scales/formats_test.pyi stubs/scales/graphite.pyi stubs/scales/loop.pyi stubs/scales/meter.pyi stubs/scales/samplestats.pyi stubs/scales/samplestats_test.pyi stubs/scales/scales_test.pyi stubs/scales/timer.pyi stubs/scales/tornadohandler.pyi stubs/scales/tornadolike.pyi stubs/scales/twistedweb.pyi stubs/scales/util.pyi stubs/scales/util_test.pyi stubs/twisted/internet/__init__.pyi stubs/twisted/internet/task.pyi stubs/twisted/protocols/__init__.py stubs/twisted/protocols/basic.pyi
diffstat 29 files changed, 805 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/cyclone/httpserver.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,43 @@
+# Stubs for cyclone.httpserver (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from twisted.protocols import basic
+from typing import Any, Dict, Optional
+
+class _BadRequestException(Exception): ...
+
+class HTTPConnection(basic.LineReceiver):
+    no_keep_alive: bool = ...
+    content_length: Any = ...
+    request_callback: Any = ...
+    xheaders: Any = ...
+    def connectionMade(self) -> None: ...
+    def connectionLost(self, reason: Any) -> None: ...
+    def notifyFinish(self): ...
+    def lineReceived(self, line: Any) -> None: ...
+    def rawDataReceived(self, data: Any) -> None: ...
+    def write(self, chunk: Any) -> None: ...
+    def finish(self) -> None: ...
+
+class HTTPRequest:
+    method: str = ...
+    uri: str = ...
+    version: str = ...
+    headers: Dict[str, str] = ...
+    body: bytes = ...
+    remote_ip: str = ...
+    protocol: str = ...
+    host: str = ...
+    files: Any = ...
+    connection: HTTPConnection = ...
+    arguments: Any = ...
+    def __init__(self, method: Any, uri: Any, version: str = ..., headers: Optional[Any] = ..., body: Optional[Any] = ..., remote_ip: Optional[Any] = ..., protocol: Optional[Any] = ..., host: Optional[Any] = ..., files: Optional[Any] = ..., connection: Optional[Any] = ...) -> None: ...
+    def supports_http_1_1(self): ...
+    @property
+    def cookies(self): ...
+    def write(self, chunk: Any) -> None: ...
+    def finish(self) -> None: ...
+    def full_url(self): ...
+    def request_time(self): ...
+    def notifyFinish(self): ...
--- a/stubs/cyclone/web.pyi	Thu May 30 01:58:36 2019 +0000
+++ b/stubs/cyclone/web.pyi	Thu May 30 08:15:10 2019 +0000
@@ -4,6 +4,7 @@
 
 from twisted.internet import protocol
 from typing import Any, Optional
+from .httpserver import HTTPRequest
 
 class RequestHandler:
     SUPPORTED_METHODS: Any = ...
@@ -11,11 +12,11 @@
     no_keep_alive: bool = ...
     xsrf_cookie_name: str = ...
     application: Any = ...
-    request: Any = ...
+    request: HTTPRequest = ...
     path_args: Any = ...
     path_kwargs: Any = ...
     ui: Any = ...
-    def __init__(self, application: Any, request: Any, **kwargs: Any) -> None: ...
+    def __init__(self, application: Any, request: HTTPRequest, **kwargs: Any) -> None: ...
 
     @property
     def settings(self): ...
@@ -30,8 +31,8 @@
     def set_header(self, name: Any, value: Any) -> None: ...
     def add_header(self, name: Any, value: Any) -> None: ...
     def clear_header(self, name: Any) -> None: ...
-    def get_argument(self, name: Any, default: Any = ..., strip: bool = ...): ...
-    def get_arguments(self, name: Any, strip: bool = ...): ...
+    def get_argument(self, name: Any, default: Any = ..., strip: bool = ...) -> str: ...
+    def get_arguments(self, name: Any, strip: bool = ...) -> List[str]: ...
     def decode_argument(self, value: Any, name: Optional[Any] = ...): ...
     @property
     def cookies(self): ...
--- a/stubs/cyclone/websocket.pyi	Thu May 30 01:58:36 2019 +0000
+++ b/stubs/cyclone/websocket.pyi	Thu May 30 08:15:10 2019 +0000
@@ -4,7 +4,7 @@
 
 import cyclone.escape
 import cyclone.web
-from typing import Any
+from typing import Any, Dict, Union
 
 class _NotEnoughFrame(Exception): ...
 
@@ -17,8 +17,8 @@
     def headersReceived(self) -> None: ...
     def connectionMade(self, *args: Any, **kwargs: Any) -> None: ...
     def connectionLost(self, reason: Any) -> None: ...
-    def messageReceived(self, message: Any) -> None: ...
-    def sendMessage(self, message: Any) -> None: ...
+    def messageReceived(self, message: bytes) -> None: ...
+    def sendMessage(self, message: Union[str, Dict]) -> None: ...
     def forbidConnection(self, message: Any): ...
 
 class WebSocketProtocol:
@@ -28,20 +28,20 @@
     def __init__(self, handler: Any) -> None: ...
     def acceptConnection(self) -> None: ...
     def rawDataReceived(self, data: Any) -> None: ...
-    def sendMessage(self, message: Any) -> None: ...
+    def sendMessage(self, message: Union[str, Dict]) -> None: ...
 
 class WebSocketProtocol17(WebSocketProtocol):
     def __init__(self, handler: Any) -> None: ...
     def acceptConnection(self) -> None: ...
     def rawDataReceived(self, data: Any) -> None: ...
-    def sendMessage(self, message: Any, code: int = ...) -> None: ...
+    def sendMessage(self, message: Union[str, Dict], code: int = ...) -> None: ...
 
 class WebSocketProtocol76(WebSocketProtocol):
     def __init__(self, handler: Any) -> None: ...
     def acceptConnection(self) -> None: ...
     def rawDataReceived(self, data: Any) -> None: ...
     def close(self) -> None: ...
-    def sendMessage(self, message: Any) -> None: ...
+    def sendMessage(self, message: Union[str, Dict]) -> None: ...
 
 class FrameDecodeError(Exception): ...
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/greplin/__init__.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,1 @@
+
--- a/stubs/greplin/scales/__init__.pyi	Thu May 30 01:58:36 2019 +0000
+++ b/stubs/greplin/scales/__init__.pyi	Thu May 30 08:15:10 2019 +0000
@@ -126,6 +126,8 @@
 
 class NamedPmfDictStat(Stat): ...
 
+class RecentFpsStat(Stat): ...
+
 class StateTimeStatDict(UserDict):
     parent: Any = ...
     instance: Any = ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/scales/__init__.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,149 @@
+# Stubs for 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/stubs/scales/aggregation.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,91 @@
+# Stubs for 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/stubs/scales/aggregation_test.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,9 @@
+# Stubs for 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/stubs/scales/bottlehandler.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,8 @@
+# Stubs for 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/stubs/scales/clock.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,8 @@
+# Stubs for 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/stubs/scales/cyclonehandler.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,8 @@
+# Stubs for 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/stubs/scales/flaskhandler.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,9 @@
+# Stubs for scales.flaskhandler (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from typing import Any
+
+def statsHandler(serverName: Any, path: str = ...): ...
+def registerStatsHandler(app: Any, serverName: Any, prefix: str = ...) -> None: ...
+def serveInBackground(port: Any, serverName: Any, prefix: str = ...): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/scales/formats.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,13 @@
+# Stubs for 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/stubs/scales/formats_test.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,24 @@
+# Stubs for 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/stubs/scales/graphite.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,25 @@
+# Stubs for 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/stubs/scales/loop.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,7 @@
+# Stubs for 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/stubs/scales/meter.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,28 @@
+# Stubs for 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/stubs/scales/samplestats.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,47 @@
+# Stubs for 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/stubs/scales/samplestats_test.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,12 @@
+# Stubs for 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/stubs/scales/scales_test.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,55 @@
+# Stubs for 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/stubs/scales/timer.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,7 @@
+# Stubs for 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/stubs/scales/tornadohandler.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,8 @@
+# Stubs for scales.tornadohandler (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+import tornado.web
+from greplin.scales import tornadolike
+
+class StatsHandler(tornadolike.Handler, tornado.web.RequestHandler): ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/scales/tornadolike.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,10 @@
+# Stubs for 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/stubs/scales/twistedweb.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,12 @@
+# Stubs for 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/stubs/scales/util.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,50 @@
+# Stubs for 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/stubs/scales/util_test.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,10 @@
+# Stubs for 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: ...
--- a/stubs/twisted/internet/__init__.pyi	Thu May 30 01:58:36 2019 +0000
+++ b/stubs/twisted/internet/__init__.pyi	Thu May 30 08:15:10 2019 +0000
@@ -3,25 +3,7 @@
 # NOTE: This dynamically typed stub was automatically generated by stubgen.
 
 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 IAddress:  # this is https://twistedmatrix.com/documents/current/api/twisted.internet.address.IPv4Address.html
-    type: str
-    host: str
-    port: int   
-    
-class IListeningPort:
-    def startListening(self): ...
-    def stopListening(self): ... # returns deferred
-    def getHost(self) -> IAddress: ...
-    _realPortNumber: int # from t.i.tcp.Port
+from .interfaces import IDelayedCall, IAddress, IListeningPort
     
 class ReactorType: # abridged
     def listenTCP(self, port: Any, factory: Any, backlog: int = ..., interface: str = ...) -> IListeningPort: ...
@@ -43,3 +25,4 @@
     
 
 reactor = ReactorType()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/twisted/internet/task.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,69 @@
+# Stubs for twisted.internet.task (Python 3)
+#
+
+from typing import Any, Optional
+
+__metaclass__ = type
+
+class LoopingCall:
+    call: Any = ...
+    running: bool = ...
+    interval: Any = ...
+    starttime: Any = ...
+    f: Any = ...
+    a: Any = ...
+    kw: Any = ...
+    clock: Any = ...
+    def __init__(self, f: Any, *a: Any, **kw: Any) -> None: ...
+    @property
+    def deferred(self): ...
+    withCount: Any = ...
+    def start(self, interval: Any, now: bool = ...): ...
+    def stop(self) -> None: ...
+    def reset(self) -> None: ...
+    def __call__(self) -> None: ...
+
+class SchedulerError(Exception): ...
+class SchedulerStopped(SchedulerError): ...
+class TaskFinished(SchedulerError): ...
+class TaskDone(TaskFinished): ...
+class TaskStopped(TaskFinished): ...
+class TaskFailed(TaskFinished): ...
+class NotPaused(SchedulerError): ...
+
+class _Timer:
+    MAX_SLICE: float = ...
+    end: Any = ...
+    def __init__(self) -> None: ...
+    def __call__(self): ...
+
+class CooperativeTask:
+    def __init__(self, iterator: Any, cooperator: Any) -> None: ...
+    def whenDone(self): ...
+    def pause(self) -> None: ...
+    def resume(self) -> None: ...
+    def stop(self) -> None: ...
+
+class Cooperator:
+    def __init__(self, terminationPredicateFactory: Any = ..., scheduler: Any = ..., started: bool = ...) -> None: ...
+    def coiterate(self, iterator: Any, doneDeferred: Optional[Any] = ...): ...
+    def cooperate(self, iterator: Any): ...
+    def start(self) -> None: ...
+    def stop(self) -> None: ...
+    @property
+    def running(self): ...
+
+def coiterate(iterator: Any): ...
+
+class Clock:
+    rightNow: float = ...
+    calls: Any = ...
+    def __init__(self) -> None: ...
+    def seconds(self): ...
+    def callLater(self, when: Any, what: Any, *a: Any, **kw: Any): ...
+    def getDelayedCalls(self): ...
+    def advance(self, amount: Any) -> None: ...
+    def pump(self, timings: Any) -> None: ...
+
+def deferLater(clock: Any, delay: Any, callable: Any, *args: Any, **kw: Any): ...
+def react(main: Any, argv: Any = ..., _reactor: Optional[Any] = ...) -> None: ...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/twisted/protocols/basic.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,87 @@
+# Stubs for twisted.protocols.basic (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from twisted.internet import protocol
+from typing import Any, Optional
+
+DEBUG: int
+
+class NetstringParseError(ValueError): ...
+class IncompleteNetstring(Exception): ...
+
+class NetstringReceiver(protocol.Protocol):
+    MAX_LENGTH: int = ...
+    brokenPeer: int = ...
+    def makeConnection(self, transport: Any) -> None: ...
+    def sendString(self, string: Any) -> None: ...
+    def dataReceived(self, data: Any) -> None: ...
+    def stringReceived(self, string: Any) -> None: ...
+
+class LineOnlyReceiver(protocol.Protocol):
+    delimiter: bytes = ...
+    MAX_LENGTH: int = ...
+    def dataReceived(self, data: Any): ...
+    def lineReceived(self, line: Any) -> None: ...
+    def sendLine(self, line: Any): ...
+    def lineLengthExceeded(self, line: Any): ...
+
+class _PauseableMixin:
+    paused: bool = ...
+    def pauseProducing(self) -> None: ...
+    def resumeProducing(self) -> None: ...
+    def stopProducing(self) -> None: ...
+
+class LineReceiver(protocol.Protocol, _PauseableMixin):
+    line_mode: int = ...
+    delimiter: bytes = ...
+    MAX_LENGTH: int = ...
+    def clearLineBuffer(self): ...
+    def dataReceived(self, data: Any): ...
+    def setLineMode(self, extra: bytes = ...): ...
+    def setRawMode(self) -> None: ...
+    def rawDataReceived(self, data: Any) -> None: ...
+    def lineReceived(self, line: Any) -> None: ...
+    def sendLine(self, line: Any): ...
+    def lineLengthExceeded(self, line: Any): ...
+
+class StringTooLongError(AssertionError): ...
+
+class _RecvdCompatHack:
+    def __get__(self, oself: Any, type: Optional[Any] = ...): ...
+
+class IntNStringReceiver(protocol.Protocol, _PauseableMixin):
+    MAX_LENGTH: int = ...
+    recvd: Any = ...
+    def stringReceived(self, string: Any) -> None: ...
+    def lengthLimitExceeded(self, length: Any) -> None: ...
+    def dataReceived(self, data: Any) -> None: ...
+    def sendString(self, string: Any) -> None: ...
+
+class Int32StringReceiver(IntNStringReceiver):
+    structFormat: str = ...
+    prefixLength: Any = ...
+
+class Int16StringReceiver(IntNStringReceiver):
+    structFormat: str = ...
+    prefixLength: Any = ...
+
+class Int8StringReceiver(IntNStringReceiver):
+    structFormat: str = ...
+    prefixLength: Any = ...
+
+class StatefulStringProtocol:
+    state: str = ...
+    def stringReceived(self, string: Any) -> None: ...
+
+class FileSender:
+    CHUNK_SIZE: Any = ...
+    lastSent: str = ...
+    deferred: Any = ...
+    file: Any = ...
+    consumer: Any = ...
+    transform: Any = ...
+    def beginFileTransfer(self, file: Any, consumer: Any, transform: Optional[Any] = ...): ...
+    def resumeProducing(self) -> None: ...
+    def pauseProducing(self) -> None: ...
+    def stopProducing(self) -> None: ...