Fixing flake8 E265 errors

This commit is contained in:
Lukasz Langa
2016-12-20 00:16:44 -08:00
parent 5b6a9937b2
commit 147772950f
24 changed files with 70 additions and 71 deletions

View File

@@ -4,7 +4,7 @@
from _curses import *
# Stubgen imports a python version of has_key only if it's not present
#in _curses (which it is in this stub)
# in _curses (which it is in this stub)
# from .has_key import has_key as has_key
def initscr(): ...

View File

@@ -15,9 +15,9 @@ class Finder(metaclass=ABCMeta): ...
# Technically this class defines the following method, but its subclasses
# in this module violate its signature. Since this class is deprecated, it's
# easier to simply ignore that this method exists.
#@abstractmethod
#def find_module(self, fullname: str,
# path: Sequence[_Path] = None) -> Optional[Loader]: ...
# @abstractmethod
# def find_module(self, fullname: str,
# path: Sequence[_Path] = None) -> Optional[Loader]: ...
class ResourceLoader(Loader):
@abstractmethod

View File

@@ -18,13 +18,13 @@ open = builtins.open
# FIXME when mypy handle condtional, we can uncomment the next block and remove
# the temporary fix
#if sys.version_info >= (3, 3):
# BlockingIOError = BlockingIOError
# class UnsupportedOperation(OSError, ValueError): ...
#else:
# class BlockingIOError(IOError):
# characters_written = ... # type: int
# class UnsupportedOperation(IOError, ValueError): ...
# if sys.version_info >= (3, 3):
# BlockingIOError = BlockingIOError
# class UnsupportedOperation(OSError, ValueError): ...
# else:
# class BlockingIOError(IOError):
# characters_written = ... # type: int
# class UnsupportedOperation(IOError, ValueError): ...
class BlockingIOError(OSError):
characters_written = ... # type: int
class UnsupportedOperation(OSError, ValueError): ...
@@ -190,12 +190,12 @@ class TextIOBase(IOBase):
class TextIOWrapper(TextIO):
line_buffering = ... # type: bool
# TODO uncomment after fixing mypy about using write_through
#if sys.version_info >= (3, 3):
# if sys.version_info >= (3, 3):
# def __init__(self, buffer: IO[bytes], encoding: str = ...,
# errors: Optional[str] = ..., newline: Optional[str] = ...,
# line_buffering: bool = ..., write_through: bool = ...) \
# -> None: ...
#else:
# else:
# def __init__(self, buffer: IO[bytes],
# encoding: str = ..., errors: Optional[str] = ...,
# newline: Optional[str] = ..., line_buffering: bool = ...) \

View File

@@ -94,13 +94,13 @@ EX_NOTFOUND = 0 # Unix only
P_NOWAIT = 0
P_NOWAITO = 0
P_WAIT = 0
#P_DETACH = 0 # Windows only
#P_OVERLAY = 0 # Windows only
# P_DETACH = 0 # Windows only
# P_OVERLAY = 0 # Windows only
# wait()/waitpid() options
WNOHANG = 0 # Unix only
#WCONTINUED = 0 # some Unix systems
#WUNTRACED = 0 # Unix only
# WCONTINUED = 0 # some Unix systems
# WUNTRACED = 0 # Unix only
TMP_MAX = 0 # Undocumented, but used by tempfile

View File

@@ -55,11 +55,11 @@ def relpath(path: AnyStr, start: AnyStr = ...) -> AnyStr: ...
def samefile(path1: AnyStr, path2: AnyStr) -> bool: ...
def sameopenfile(fp1: int, fp2: int) -> bool: ...
#def samestat(stat1: stat_result,
# def samestat(stat1: stat_result,
# stat2: stat_result) -> bool: ... # Unix only
def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
#def splitunc(path: str) -> Tuple[str, str]: ... # Windows only, deprecated
# def splitunc(path: str) -> Tuple[str, str]: ... # Windows only, deprecated

View File

@@ -38,9 +38,9 @@ def samefile(path1: str, path2: str) -> bool: ...
def sameopenfile(fp1: IO[Any], fp2: IO[Any]) -> bool: ...
#def samestat(stat1: stat_result, stat2: stat_result) -> bool:
# def samestat(stat1: stat_result, stat2: stat_result) -> bool:
# ... # Unix only
def split(path: str) -> Tuple[str, str]: ...
def splitdrive(path: str) -> Tuple[str, str]: ...
def splitext(path: str) -> Tuple[str, str]: ...
#def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated
# def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated

View File

@@ -17,7 +17,7 @@ argv = ... # type: List[str]
byteorder = ... # type: str
builtin_module_names = ... # type: Sequence[str] # actually a tuple of strings
copyright = ... # type: str
#dllhandle = 0 # Windows only
# dllhandle = 0 # Windows only
dont_write_bytecode = False
__displayhook__ = ... # type: Any # contains the original value of displayhook
__excepthook__ = ... # type: Any # contains the original value of excepthook
@@ -53,7 +53,7 @@ api_version = 0
warnoptions = ... # type: Any
# Each entry is a tuple of the form (action, message, category, module,
# lineno)
#winver = '' # Windows only
# winver = '' # Windows only
_xoptions = ... # type: Dict[Any, Any]
flags = ... # type: _flags