From 4381e0a558ef0e297881d7db15e9150d812cb6ce Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 30 Aug 2021 05:23:28 -0700 Subject: [PATCH] Remove @python2-only third party stubs that aren't also dependencies (#5975) Closes #5969 --- pyrightconfig.json | 7 +- pyrightconfig.stricter.json | 5 - stubs/Routes/@python2/routes/__init__.pyi | 10 - stubs/Routes/@python2/routes/mapper.pyi | 77 ----- stubs/Routes/@python2/routes/util.pyi | 20 -- stubs/Routes/METADATA.toml | 2 - .../fb303/@python2/fb303/FacebookService.pyi | 298 ------------------ stubs/fb303/@python2/fb303/__init__.pyi | 0 stubs/fb303/METADATA.toml | 2 - stubs/kazoo/@python2/kazoo/__init__.pyi | 0 stubs/kazoo/@python2/kazoo/client.pyi | 109 ------- stubs/kazoo/@python2/kazoo/exceptions.pyi | 58 ---- .../kazoo/@python2/kazoo/recipe/__init__.pyi | 0 .../kazoo/@python2/kazoo/recipe/watchers.pyi | 21 -- stubs/kazoo/METADATA.toml | 2 - stubs/pathlib2/@python2/pathlib2.pyi | 98 ------ stubs/pathlib2/METADATA.toml | 2 - stubs/pymssql/@python2/pymssql.pyi | 44 --- stubs/pymssql/METADATA.toml | 2 - stubs/scribe/@python2/scribe/__init__.pyi | 0 stubs/scribe/@python2/scribe/scribe.pyi | 41 --- stubs/scribe/@python2/scribe/ttypes.pyi | 18 -- stubs/scribe/METADATA.toml | 3 - 23 files changed, 1 insertion(+), 818 deletions(-) delete mode 100644 stubs/Routes/@python2/routes/__init__.pyi delete mode 100644 stubs/Routes/@python2/routes/mapper.pyi delete mode 100644 stubs/Routes/@python2/routes/util.pyi delete mode 100644 stubs/Routes/METADATA.toml delete mode 100644 stubs/fb303/@python2/fb303/FacebookService.pyi delete mode 100644 stubs/fb303/@python2/fb303/__init__.pyi delete mode 100644 stubs/fb303/METADATA.toml delete mode 100644 stubs/kazoo/@python2/kazoo/__init__.pyi delete mode 100644 stubs/kazoo/@python2/kazoo/client.pyi delete mode 100644 stubs/kazoo/@python2/kazoo/exceptions.pyi delete mode 100644 stubs/kazoo/@python2/kazoo/recipe/__init__.pyi delete mode 100644 stubs/kazoo/@python2/kazoo/recipe/watchers.pyi delete mode 100644 stubs/kazoo/METADATA.toml delete mode 100644 stubs/pathlib2/@python2/pathlib2.pyi delete mode 100644 stubs/pathlib2/METADATA.toml delete mode 100644 stubs/pymssql/@python2/pymssql.pyi delete mode 100644 stubs/pymssql/METADATA.toml delete mode 100644 stubs/scribe/@python2/scribe/__init__.pyi delete mode 100644 stubs/scribe/@python2/scribe/scribe.pyi delete mode 100644 stubs/scribe/@python2/scribe/ttypes.pyi delete mode 100644 stubs/scribe/METADATA.toml diff --git a/pyrightconfig.json b/pyrightconfig.json index 8d7d17d72..a9d30d51b 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -8,13 +8,8 @@ // Python 2 only modules. "**/@python2", "stubs/enum34", - "stubs/fb303", "stubs/futures", - "stubs/ipaddress", - "stubs/kazoo", - "stubs/pathlib2", - "stubs/pymssql", - "stubs/scribe", + "stubs/ipaddress" ], "typeCheckingMode": "basic", "strictListInference": true, diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 3b953fe55..bbd45088c 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -9,13 +9,8 @@ // Python 2 only modules. "**/@python2", "stubs/enum34", - "stubs/fb303", "stubs/futures", "stubs/ipaddress", - "stubs/kazoo", - "stubs/pathlib2", - "stubs/pymssql", - "stubs/scribe", // Modules that are incomplete in some way. "stdlib/distutils/command", "stdlib/lib2to3/refactor.pyi", diff --git a/stubs/Routes/@python2/routes/__init__.pyi b/stubs/Routes/@python2/routes/__init__.pyi deleted file mode 100644 index 0349f8840..000000000 --- a/stubs/Routes/@python2/routes/__init__.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from .mapper import Mapper as Mapper -from .util import URLGenerator as URLGenerator, redirect_to as redirect_to, url_for as url_for - -class _RequestConfig: - def __getattr__(self, name): ... - def __setattr__(self, name, value): ... - def __delattr__(self, name): ... - def load_wsgi_environ(self, environ): ... - -def request_config(original=...): ... diff --git a/stubs/Routes/@python2/routes/mapper.pyi b/stubs/Routes/@python2/routes/mapper.pyi deleted file mode 100644 index a3e21e8d0..000000000 --- a/stubs/Routes/@python2/routes/mapper.pyi +++ /dev/null @@ -1,77 +0,0 @@ -from typing import Any - -COLLECTION_ACTIONS: Any -MEMBER_ACTIONS: Any - -def strip_slashes(name): ... - -class SubMapperParent: - def submapper(self, **kargs): ... - def collection( - self, - collection_name, - resource_name, - path_prefix=..., - member_prefix=..., - controller=..., - collection_actions=..., - member_actions=..., - member_options=..., - **kwargs, - ): ... - -class SubMapper(SubMapperParent): - kwargs: Any - obj: Any - collection_name: Any - member: Any - resource_name: Any - formatted: Any - def __init__(self, obj, resource_name=..., collection_name=..., actions=..., formatted=..., **kwargs) -> None: ... - def connect(self, *args, **kwargs): ... - def link(self, rel=..., name=..., action=..., method=..., formatted=..., **kwargs): ... - def new(self, **kwargs): ... - def edit(self, **kwargs): ... - def action(self, name=..., action=..., method=..., formatted=..., **kwargs): ... - def index(self, name=..., **kwargs): ... - def show(self, name=..., **kwargs): ... - def create(self, **kwargs): ... - def update(self, **kwargs): ... - def delete(self, **kwargs): ... - def add_actions(self, actions): ... - def __enter__(self): ... - def __exit__(self, type, value, tb): ... - -class Mapper(SubMapperParent): - matchlist: Any - maxkeys: Any - minkeys: Any - urlcache: Any - prefix: Any - req_data: Any - directory: Any - always_scan: Any - controller_scan: Any - debug: Any - append_slash: Any - sub_domains: Any - sub_domains_ignore: Any - domain_match: Any - explicit: Any - encoding: Any - decode_errors: Any - hardcode_names: Any - minimization: Any - create_regs_lock: Any - def __init__(self, controller_scan=..., directory=..., always_scan=..., register=..., explicit=...) -> None: ... - environ: Any - def extend(self, routes, path_prefix=...): ... - def make_route(self, *args, **kargs): ... - def connect(self, *args, **kargs): ... - def create_regs(self, *args, **kwargs): ... - def match(self, url=..., environ=...): ... - def routematch(self, url=..., environ=...): ... - obj: Any - def generate(self, *args, **kargs): ... - def resource(self, member_name, collection_name, **kwargs): ... - def redirect(self, match_path, destination_path, *args, **kwargs): ... diff --git a/stubs/Routes/@python2/routes/util.pyi b/stubs/Routes/@python2/routes/util.pyi deleted file mode 100644 index e3be1d4be..000000000 --- a/stubs/Routes/@python2/routes/util.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Any - -class RoutesException(Exception): ... -class MatchException(RoutesException): ... -class GenerationException(RoutesException): ... - -def url_for(*args, **kargs): ... - -class URLGenerator: - mapper: Any - environ: Any - def __init__(self, mapper, environ) -> None: ... - def __call__(self, *args, **kargs): ... - def current(self, *args, **kwargs): ... - -def redirect_to(*args, **kargs): ... -def cache_hostinfo(environ): ... -def controller_scan(directory=...): ... -def as_unicode(value, encoding, errors=...): ... -def ascii_characters(string): ... diff --git a/stubs/Routes/METADATA.toml b/stubs/Routes/METADATA.toml deleted file mode 100644 index c69c3118d..000000000 --- a/stubs/Routes/METADATA.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "2.5" -python2 = true diff --git a/stubs/fb303/@python2/fb303/FacebookService.pyi b/stubs/fb303/@python2/fb303/FacebookService.pyi deleted file mode 100644 index 4a41a9abf..000000000 --- a/stubs/fb303/@python2/fb303/FacebookService.pyi +++ /dev/null @@ -1,298 +0,0 @@ -from typing import Any, ContextManager - -TProcessor = Any # actually thrift.Thrift.TProcessor - -fastbinary: Any - -class Iface: - def getName(self): ... - def getVersion(self): ... - def getStatus(self): ... - def getStatusDetails(self): ... - def getCounters(self): ... - def getCounter(self, key): ... - def setOption(self, key, value): ... - def getOption(self, key): ... - def getOptions(self): ... - def getCpuProfile(self, profileDurationInSec): ... - def aliveSince(self): ... - def reinitialize(self): ... - def shutdown(self): ... - -class Client(Iface, ContextManager[Client]): - def __init__(self, iprot, oprot=...) -> None: ... - def getName(self): ... - def send_getName(self): ... - def recv_getName(self): ... - def getVersion(self): ... - def send_getVersion(self): ... - def recv_getVersion(self): ... - def getStatus(self): ... - def send_getStatus(self): ... - def recv_getStatus(self): ... - def getStatusDetails(self): ... - def send_getStatusDetails(self): ... - def recv_getStatusDetails(self): ... - def getCounters(self): ... - def send_getCounters(self): ... - def recv_getCounters(self): ... - def getCounter(self, key): ... - def send_getCounter(self, key): ... - def recv_getCounter(self): ... - def setOption(self, key, value): ... - def send_setOption(self, key, value): ... - def recv_setOption(self): ... - def getOption(self, key): ... - def send_getOption(self, key): ... - def recv_getOption(self): ... - def getOptions(self): ... - def send_getOptions(self): ... - def recv_getOptions(self): ... - def getCpuProfile(self, profileDurationInSec): ... - def send_getCpuProfile(self, profileDurationInSec): ... - def recv_getCpuProfile(self): ... - def aliveSince(self): ... - def send_aliveSince(self): ... - def recv_aliveSince(self): ... - def reinitialize(self): ... - def send_reinitialize(self): ... - def shutdown(self): ... - def send_shutdown(self): ... - -class Processor(Iface, TProcessor): # type: ignore - def __init__(self, handler) -> None: ... - def process(self, iprot, oprot): ... - def process_getName(self, seqid, iprot, oprot): ... - def process_getVersion(self, seqid, iprot, oprot): ... - def process_getStatus(self, seqid, iprot, oprot): ... - def process_getStatusDetails(self, seqid, iprot, oprot): ... - def process_getCounters(self, seqid, iprot, oprot): ... - def process_getCounter(self, seqid, iprot, oprot): ... - def process_setOption(self, seqid, iprot, oprot): ... - def process_getOption(self, seqid, iprot, oprot): ... - def process_getOptions(self, seqid, iprot, oprot): ... - def process_getCpuProfile(self, seqid, iprot, oprot): ... - def process_aliveSince(self, seqid, iprot, oprot): ... - def process_reinitialize(self, seqid, iprot, oprot): ... - def process_shutdown(self, seqid, iprot, oprot): ... - -class getName_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getName_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getVersion_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getVersion_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatus_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatus_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatusDetails_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatusDetails_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounters_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounters_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounter_args: - thrift_spec: Any - key: Any - def __init__(self, key=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounter_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class setOption_args: - thrift_spec: Any - key: Any - value: Any - def __init__(self, key=..., value=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class setOption_result: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOption_args: - thrift_spec: Any - key: Any - def __init__(self, key=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOption_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOptions_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOptions_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCpuProfile_args: - thrift_spec: Any - profileDurationInSec: Any - def __init__(self, profileDurationInSec=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCpuProfile_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class aliveSince_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class aliveSince_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class reinitialize_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class shutdown_args: - thrift_spec: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/fb303/@python2/fb303/__init__.pyi b/stubs/fb303/@python2/fb303/__init__.pyi deleted file mode 100644 index e69de29bb..000000000 diff --git a/stubs/fb303/METADATA.toml b/stubs/fb303/METADATA.toml deleted file mode 100644 index f339dc7fd..000000000 --- a/stubs/fb303/METADATA.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "1.0" -python2 = true diff --git a/stubs/kazoo/@python2/kazoo/__init__.pyi b/stubs/kazoo/@python2/kazoo/__init__.pyi deleted file mode 100644 index e69de29bb..000000000 diff --git a/stubs/kazoo/@python2/kazoo/client.pyi b/stubs/kazoo/@python2/kazoo/client.pyi deleted file mode 100644 index ea69edef7..000000000 --- a/stubs/kazoo/@python2/kazoo/client.pyi +++ /dev/null @@ -1,109 +0,0 @@ -from typing import Any - -string_types: Any -bytes_types: Any -LOST_STATES: Any -ENVI_VERSION: Any -ENVI_VERSION_KEY: Any -log: Any - -class KazooClient: - logger: Any - handler: Any - auth_data: Any - default_acl: Any - randomize_hosts: Any - hosts: Any - chroot: Any - state: Any - state_listeners: Any - read_only: Any - retry: Any - Barrier: Any - Counter: Any - DoubleBarrier: Any - ChildrenWatch: Any - DataWatch: Any - Election: Any - NonBlockingLease: Any - MultiNonBlockingLease: Any - Lock: Any - Party: Any - Queue: Any - LockingQueue: Any - SetPartitioner: Any - Semaphore: Any - ShallowParty: Any - def __init__( - self, - hosts=..., - timeout=..., - client_id=..., - handler=..., - default_acl=..., - auth_data=..., - read_only=..., - randomize_hosts=..., - connection_retry=..., - command_retry=..., - logger=..., - **kwargs, - ) -> None: ... - @property - def client_state(self): ... - @property - def client_id(self): ... - @property - def connected(self): ... - def set_hosts(self, hosts, randomize_hosts=...): ... - def add_listener(self, listener): ... - def remove_listener(self, listener): ... - def start(self, timeout=...): ... - def start_async(self): ... - def stop(self): ... - def restart(self): ... - def close(self): ... - def command(self, cmd=...): ... - def server_version(self, retries=...): ... - def add_auth(self, scheme, credential): ... - def add_auth_async(self, scheme, credential): ... - def unchroot(self, path): ... - def sync_async(self, path): ... - def sync(self, path): ... - def create(self, path, value=..., acl=..., ephemeral=..., sequence=..., makepath=...): ... - def create_async(self, path, value=..., acl=..., ephemeral=..., sequence=..., makepath=...): ... - def ensure_path(self, path, acl=...): ... - def ensure_path_async(self, path, acl=...): ... - def exists(self, path, watch=...): ... - def exists_async(self, path, watch=...): ... - def get(self, path, watch=...): ... - def get_async(self, path, watch=...): ... - def get_children(self, path, watch=..., include_data=...): ... - def get_children_async(self, path, watch=..., include_data=...): ... - def get_acls(self, path): ... - def get_acls_async(self, path): ... - def set_acls(self, path, acls, version=...): ... - def set_acls_async(self, path, acls, version=...): ... - def set(self, path, value, version=...): ... - def set_async(self, path, value, version=...): ... - def transaction(self): ... - def delete(self, path, version=..., recursive=...): ... - def delete_async(self, path, version=...): ... - def reconfig(self, joining, leaving, new_members, from_config=...): ... - def reconfig_async(self, joining, leaving, new_members, from_config): ... - -class TransactionRequest: - client: Any - operations: Any - committed: Any - def __init__(self, client) -> None: ... - def create(self, path, value=..., acl=..., ephemeral=..., sequence=...): ... - def delete(self, path, version=...): ... - def set_data(self, path, value, version=...): ... - def check(self, path, version): ... - def commit_async(self): ... - def commit(self): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, exc_tb): ... - -class KazooState: ... diff --git a/stubs/kazoo/@python2/kazoo/exceptions.pyi b/stubs/kazoo/@python2/kazoo/exceptions.pyi deleted file mode 100644 index 4dd76cca5..000000000 --- a/stubs/kazoo/@python2/kazoo/exceptions.pyi +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any - -class KazooException(Exception): ... -class ZookeeperError(KazooException): ... -class CancelledError(KazooException): ... -class ConfigurationError(KazooException): ... -class ZookeeperStoppedError(KazooException): ... -class ConnectionDropped(KazooException): ... -class LockTimeout(KazooException): ... -class WriterNotClosedException(KazooException): ... - -EXCEPTIONS: Any - -class RolledBackError(ZookeeperError): ... -class SystemZookeeperError(ZookeeperError): ... -class RuntimeInconsistency(ZookeeperError): ... -class DataInconsistency(ZookeeperError): ... -class ConnectionLoss(ZookeeperError): ... -class MarshallingError(ZookeeperError): ... -class UnimplementedError(ZookeeperError): ... -class OperationTimeoutError(ZookeeperError): ... -class BadArgumentsError(ZookeeperError): ... -class NewConfigNoQuorumError(ZookeeperError): ... -class ReconfigInProcessError(ZookeeperError): ... -class APIError(ZookeeperError): ... -class NoNodeError(ZookeeperError): ... -class NoAuthError(ZookeeperError): ... -class BadVersionError(ZookeeperError): ... -class NoChildrenForEphemeralsError(ZookeeperError): ... -class NodeExistsError(ZookeeperError): ... -class NotEmptyError(ZookeeperError): ... -class SessionExpiredError(ZookeeperError): ... -class InvalidCallbackError(ZookeeperError): ... -class InvalidACLError(ZookeeperError): ... -class AuthFailedError(ZookeeperError): ... -class SessionMovedError(ZookeeperError): ... -class NotReadOnlyCallError(ZookeeperError): ... -class ConnectionClosedError(SessionExpiredError): ... - -ConnectionLossException: Any -MarshallingErrorException: Any -SystemErrorException: Any -RuntimeInconsistencyException: Any -DataInconsistencyException: Any -UnimplementedException: Any -OperationTimeoutException: Any -BadArgumentsException: Any -ApiErrorException: Any -NoNodeException: Any -NoAuthException: Any -BadVersionException: Any -NoChildrenForEphemeralsException: Any -NodeExistsException: Any -InvalidACLException: Any -AuthFailedException: Any -NotEmptyException: Any -SessionExpiredException: Any -InvalidCallbackException: Any diff --git a/stubs/kazoo/@python2/kazoo/recipe/__init__.pyi b/stubs/kazoo/@python2/kazoo/recipe/__init__.pyi deleted file mode 100644 index e69de29bb..000000000 diff --git a/stubs/kazoo/@python2/kazoo/recipe/watchers.pyi b/stubs/kazoo/@python2/kazoo/recipe/watchers.pyi deleted file mode 100644 index 111a48c69..000000000 --- a/stubs/kazoo/@python2/kazoo/recipe/watchers.pyi +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Any - -log: Any - -class DataWatch: - def __init__(self, client, path, func=..., *args, **kwargs) -> None: ... - def __call__(self, func): ... - -class ChildrenWatch: - def __init__(self, client, path, func=..., allow_session_lost=..., send_event=...) -> None: ... - def __call__(self, func): ... - -class PatientChildrenWatch: - client: Any - path: Any - children: Any - time_boundary: Any - children_changed: Any - def __init__(self, client, path, time_boundary=...) -> None: ... - asy: Any - def start(self): ... diff --git a/stubs/kazoo/METADATA.toml b/stubs/kazoo/METADATA.toml deleted file mode 100644 index 31f638bf3..000000000 --- a/stubs/kazoo/METADATA.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "0.1" -python2 = true diff --git a/stubs/pathlib2/@python2/pathlib2.pyi b/stubs/pathlib2/@python2/pathlib2.pyi deleted file mode 100644 index da13b975a..000000000 --- a/stubs/pathlib2/@python2/pathlib2.pyi +++ /dev/null @@ -1,98 +0,0 @@ -import os -from types import TracebackType -from typing import IO, Any, Generator, List, Optional, Sequence, Text, Tuple, Type, TypeVar, Union - -_P = TypeVar("_P", bound=PurePath) - -_PurePathBase = object - -class PurePath(_PurePathBase): - parts: Tuple[str, ...] - drive: str - root: str - anchor: str - name: str - suffix: str - suffixes: List[str] - stem: str - def __new__(cls: Type[_P], *args: Union[Text, PurePath]) -> _P: ... - def __hash__(self) -> int: ... - def __lt__(self, other: PurePath) -> bool: ... - def __le__(self, other: PurePath) -> bool: ... - def __gt__(self, other: PurePath) -> bool: ... - def __ge__(self, other: PurePath) -> bool: ... - def __truediv__(self: _P, key: Union[Text, PurePath]) -> _P: ... - def __rtruediv__(self: _P, key: Union[Text, PurePath]) -> _P: ... - def __div__(self: _P, key: Union[Text, PurePath]) -> _P: ... - def __bytes__(self) -> bytes: ... - def as_posix(self) -> str: ... - def as_uri(self) -> str: ... - def is_absolute(self) -> bool: ... - def is_reserved(self) -> bool: ... - def match(self, path_pattern: Text) -> bool: ... - def relative_to(self: _P, *other: Union[Text, PurePath]) -> _P: ... - def with_name(self: _P, name: Text) -> _P: ... - def with_suffix(self: _P, suffix: Text) -> _P: ... - def joinpath(self: _P, *other: Union[Text, PurePath]) -> _P: ... - @property - def parents(self: _P) -> Sequence[_P]: ... - @property - def parent(self: _P) -> _P: ... - -class PurePosixPath(PurePath): ... -class PureWindowsPath(PurePath): ... - -class Path(PurePath): - def __new__(cls: Type[_P], *args: Union[Text, PurePath], **kwargs: Any) -> _P: ... - def __enter__(self) -> Path: ... - def __exit__( - self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType] - ) -> Optional[bool]: ... - @classmethod - def cwd(cls: Type[_P]) -> _P: ... - def stat(self) -> os.stat_result: ... - def chmod(self, mode: int) -> None: ... - def exists(self) -> bool: ... - def glob(self, pattern: Text) -> Generator[Path, None, None]: ... - def group(self) -> str: ... - def is_dir(self) -> bool: ... - def is_file(self) -> bool: ... - def is_symlink(self) -> bool: ... - def is_socket(self) -> bool: ... - def is_fifo(self) -> bool: ... - def is_block_device(self) -> bool: ... - def is_char_device(self) -> bool: ... - def iterdir(self) -> Generator[Path, None, None]: ... - def lchmod(self, mode: int) -> None: ... - def lstat(self) -> os.stat_result: ... - def mkdir(self, mode: int = ..., parents: bool = ..., exist_ok: bool = ...) -> None: ... - # Adapted from _io.open - def open( - self, - mode: Text = ..., - buffering: int = ..., - encoding: Optional[Text] = ..., - errors: Optional[Text] = ..., - newline: Optional[Text] = ..., - ) -> IO[Any]: ... - def owner(self) -> str: ... - def rename(self, target: Union[Text, PurePath]) -> None: ... - def replace(self, target: Union[Text, PurePath]) -> None: ... - def resolve(self: _P) -> _P: ... - def rglob(self, pattern: Text) -> Generator[Path, None, None]: ... - def rmdir(self) -> None: ... - def symlink_to(self, target: Union[Text, Path], target_is_directory: bool = ...) -> None: ... - def touch(self, mode: int = ..., exist_ok: bool = ...) -> None: ... - def unlink(self) -> None: ... - @classmethod - def home(cls: Type[_P]) -> _P: ... - def absolute(self: _P) -> _P: ... - def expanduser(self: _P) -> _P: ... - def read_bytes(self) -> bytes: ... - def read_text(self, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> str: ... - def samefile(self, other_path: Union[Text, bytes, int, Path]) -> bool: ... - def write_bytes(self, data: bytes) -> int: ... - def write_text(self, data: Text, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> int: ... - -class PosixPath(Path, PurePosixPath): ... -class WindowsPath(Path, PureWindowsPath): ... diff --git a/stubs/pathlib2/METADATA.toml b/stubs/pathlib2/METADATA.toml deleted file mode 100644 index f7b27af62..000000000 --- a/stubs/pathlib2/METADATA.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "2.3" -python2 = true diff --git a/stubs/pymssql/@python2/pymssql.pyi b/stubs/pymssql/@python2/pymssql.pyi deleted file mode 100644 index 599f9d4b6..000000000 --- a/stubs/pymssql/@python2/pymssql.pyi +++ /dev/null @@ -1,44 +0,0 @@ -from datetime import date, datetime, time -from typing import Any, Dict, List, Optional, Sequence, Tuple, Union - -Scalar = Union[int, float, str, datetime, date, time] -Result = Union[Tuple[Scalar, ...], Dict[str, Scalar]] - -class Connection(object): - def __init__(self, user, password, host, database, timeout, login_timeout, charset, as_dict) -> None: ... - def autocommit(self, status: bool) -> None: ... - def close(self) -> None: ... - def commit(self) -> None: ... - def cursor(self) -> Cursor: ... - def rollback(self) -> None: ... - -class Cursor(object): - def __init__(self) -> None: ... - def __iter__(self): ... - def __next__(self) -> Any: ... - def callproc(self, procname: str, **kwargs) -> None: ... - def close(self) -> None: ... - def execute(self, stmt: str, params: Optional[Union[Scalar, Tuple[Scalar, ...], Dict[str, Scalar]]]) -> None: ... - def executemany(self, stmt: str, params: Optional[Sequence[Tuple[Scalar, ...]]]) -> None: ... - def fetchall(self) -> List[Result]: ... - def fetchmany(self, size: Optional[int]) -> List[Result]: ... - def fetchone(self) -> Result: ... - -def connect( - server: Optional[str], - user: Optional[str], - password: Optional[str], - database: Optional[str], - timeout: Optional[int], - login_timeout: Optional[int], - charset: Optional[str], - as_dict: Optional[bool], - host: Optional[str], - appname: Optional[str], - port: Optional[str], - conn_properties: Optional[Union[str, Sequence[str]]], - autocommit: Optional[bool], - tds_version: Optional[str], -) -> Connection: ... -def get_max_connections() -> int: ... -def set_max_connections(n: int) -> None: ... diff --git a/stubs/pymssql/METADATA.toml b/stubs/pymssql/METADATA.toml deleted file mode 100644 index 932791b63..000000000 --- a/stubs/pymssql/METADATA.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "2.1" -python2 = true diff --git a/stubs/scribe/@python2/scribe/__init__.pyi b/stubs/scribe/@python2/scribe/__init__.pyi deleted file mode 100644 index e69de29bb..000000000 diff --git a/stubs/scribe/@python2/scribe/scribe.pyi b/stubs/scribe/@python2/scribe/scribe.pyi deleted file mode 100644 index c1e447476..000000000 --- a/stubs/scribe/@python2/scribe/scribe.pyi +++ /dev/null @@ -1,41 +0,0 @@ -from typing import Any - -import fb303.FacebookService - -from .ttypes import * # noqa: F403 - -TProcessor = Any # actually thrift.Thrift.TProcessor - -class Iface(fb303.FacebookService.Iface): - def Log(self, messages): ... - -class Client(fb303.FacebookService.Client, Iface): - def __init__(self, iprot, oprot=...) -> None: ... - def Log(self, messages): ... - def send_Log(self, messages): ... - def recv_Log(self): ... - -class Processor(fb303.FacebookService.Processor, Iface, TProcessor): # type: ignore - def __init__(self, handler) -> None: ... - def process(self, iprot, oprot): ... - def process_Log(self, seqid, iprot, oprot): ... - -class Log_args: - thrift_spec: Any - messages: Any - def __init__(self, messages=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class Log_result: - thrift_spec: Any - success: Any - def __init__(self, success=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/scribe/@python2/scribe/ttypes.pyi b/stubs/scribe/@python2/scribe/ttypes.pyi deleted file mode 100644 index 5bb7ded6b..000000000 --- a/stubs/scribe/@python2/scribe/ttypes.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Any - -fastbinary: Any - -class ResultCode: - OK: Any - TRY_LATER: Any - -class LogEntry: - thrift_spec: Any - category: Any - message: Any - def __init__(self, category=..., message=...) -> None: ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/scribe/METADATA.toml b/stubs/scribe/METADATA.toml deleted file mode 100644 index a3c38356e..000000000 --- a/stubs/scribe/METADATA.toml +++ /dev/null @@ -1,3 +0,0 @@ -version = "2.0" -python2 = true -requires = ["types-fb303"]