mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-22 01:28:29 +08:00
Fixing flake8 E401, E402 errors
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from typing import Union, Tuple, Sequence
|
||||
from abc import abstractmethod
|
||||
|
||||
import asyncore
|
||||
import socket
|
||||
import sys
|
||||
from typing import Union, Tuple, Sequence
|
||||
|
||||
|
||||
class simple_producer:
|
||||
def __init__(self, data: str, buffer_size: int = ...) -> None: ...
|
||||
@@ -30,7 +31,6 @@ class async_chat (asyncore.dispatcher):
|
||||
def initiate_send(self) -> None: ...
|
||||
def discard_buffers(self) -> None: ...
|
||||
|
||||
import sys
|
||||
if sys.version_info < (3, 0, 0):
|
||||
class fifo:
|
||||
def __init__(self, list: Sequence[Union[str, simple_producer]] = ...) -> None: ...
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
from typing import Tuple, Union, Optional, Any, Dict, overload
|
||||
|
||||
import select, socket, sys, time, warnings, os
|
||||
import os
|
||||
import select
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import warnings
|
||||
|
||||
from errno import (EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL,
|
||||
ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED,
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# Stubs for logging.handlers (Python 2.4)
|
||||
|
||||
from typing import Any, Callable, Optional, Tuple, Union, overload
|
||||
from logging import Handler, FileHandler, LogRecord
|
||||
import datetime
|
||||
from logging import Handler, FileHandler, LogRecord
|
||||
from socket import SocketType
|
||||
import ssl
|
||||
import sys
|
||||
from typing import Any, Callable, Optional, Tuple, Union, overload
|
||||
if sys.version_info >= (3,):
|
||||
from queue import Queue
|
||||
else:
|
||||
from Queue import Queue
|
||||
from socket import SocketType
|
||||
# TODO update socket stubs to add SocketKind
|
||||
SocketKind = int
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
|
||||
class WatchedFileHandler(Handler):
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
# Stubs for mmap
|
||||
|
||||
from typing import (Optional, Sequence, Union, Generic, TypeVar, overload,
|
||||
Iterable, Container, Sized, Reversible)
|
||||
import sys
|
||||
from types import TracebackType
|
||||
from typing import (Optional, Sequence, Union, Generic, TypeVar, overload,
|
||||
Iterable, Container, Sized, Reversible, Type)
|
||||
|
||||
|
||||
_T = TypeVar('_T', str, bytes)
|
||||
|
||||
# TODO already in PEP, have to get added to mypy
|
||||
from typing import Type
|
||||
from types import TracebackType
|
||||
_C = TypeVar('_C')
|
||||
class _ContextManager(Generic[_C]):
|
||||
def __enter__(self) -> _C: ...
|
||||
|
||||
Reference in New Issue
Block a user