Fixing flake8 E266 errors

This commit is contained in:
Lukasz Langa
2016-12-20 00:06:36 -08:00
parent 6b5c6626d6
commit 5b6a9937b2
10 changed files with 85 additions and 86 deletions

View File

@@ -18,7 +18,6 @@ ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704
# Errors that we need to fix before enabling flake8 by default:
# 921 F821 undefined name
# 85 E266 too many leading ### in a block comment
# 59 E265 block comment should start with #
# 52 E402 module-level import not at top of file
# 48 E225 missing whitespace around operator

View File

@@ -1,4 +1,4 @@
## Stubs for logging (Python 3.4)
# Stubs for logging (Python 3.4)
from typing import (
Any, Callable, Dict, Iterable, Mapping, MutableMapping, Optional, IO,

View File

@@ -1,4 +1,4 @@
## Stubs for logging.handlers (Python 2.4)
# Stubs for logging.handlers (Python 2.4)
from typing import Any, Callable, Optional, Tuple, Union, overload
from logging import Handler, FileHandler, LogRecord

View File

@@ -1,4 +1,4 @@
## Stubs for tarfile
# Stubs for tarfile
from typing import (
Callable, IO, Iterable, Iterator, List, Mapping, Optional, Type,

View File

@@ -1,4 +1,4 @@
## Stubs for unittest
# Stubs for unittest
from typing import (
Any, Callable, Iterable, Iterator, List, Optional, Pattern, Sequence,

View File

@@ -1,4 +1,4 @@
## Stubs for unittest.mock
# Stubs for unittest.mock
import sys
from typing import Any

View File

@@ -37,4 +37,4 @@ TINYTEXT = base.TINYTEXT
VARBINARY = base.VARBINARY
VARCHAR = base.VARCHAR
YEAR = base.YEAR
## dialect = base.dialect
# dialect = base.dialect

View File

@@ -9,10 +9,10 @@ from ... import util
from ... import types
sqltypes = sql.sqltypes
## compiler = sql.compiler
## reflection = engine.reflection
## default = engine.default
## topological = util.topological
# compiler = sql.compiler
# reflection = engine.reflection
# default = engine.default
# topological = util.topological
DATE = types.DATE
BOOLEAN = types.BOOLEAN
BLOB = types.BLOB
@@ -29,19 +29,19 @@ class _NumericType:
def __init__(self, unsigned=..., zerofill=..., **kw) -> None: ...
class _FloatType(_NumericType,
## sqltypes.Float
# sqltypes.Float
):
scale = ... # type: Any
def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ...
class _IntegerType(_NumericType,
## sqltypes.Integer
# sqltypes.Integer
):
display_width = ... # type: Any
def __init__(self, display_width=..., **kw) -> None: ...
class _StringType(object,
## sqltypes.String
# sqltypes.String
):
charset = ... # type: Any
ascii = ... # type: Any
@@ -51,19 +51,19 @@ class _StringType(object,
def __init__(self, charset=..., collation=..., ascii=..., binary=..., unicode=..., national=..., **kw) -> None: ...
class _MatchType(object,
## sqltypes.Float,
## sqltypes.MatchType
# sqltypes.Float,
# sqltypes.MatchType
):
def __init__(self, **kw) -> None: ...
class NUMERIC(_NumericType,
## sqltypes.NUMERIC
# sqltypes.NUMERIC
):
__visit_name__ = ... # type: Any
def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ...
class DECIMAL(_NumericType,
## sqltypes.DECIMAL
# sqltypes.DECIMAL
):
__visit_name__ = ... # type: Any
def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ...
@@ -73,26 +73,26 @@ class DOUBLE(_FloatType):
def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ...
class REAL(_FloatType,
## sqltypes.REAL
# sqltypes.REAL
):
__visit_name__ = ... # type: Any
def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ...
class FLOAT(_FloatType,
## sqltypes.FLOAT
# sqltypes.FLOAT
):
__visit_name__ = ... # type: Any
def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ...
def bind_processor(self, dialect): ...
class INTEGER(_IntegerType,
## sqltypes.INTEGER
# sqltypes.INTEGER
):
__visit_name__ = ... # type: Any
def __init__(self, display_width=..., **kw) -> None: ...
class BIGINT(_IntegerType,
## sqltypes.BIGINT
# sqltypes.BIGINT
):
__visit_name__ = ... # type: Any
def __init__(self, display_width=..., **kw) -> None: ...
@@ -106,13 +106,13 @@ class TINYINT(_IntegerType):
def __init__(self, display_width=..., **kw) -> None: ...
class SMALLINT(_IntegerType,
## sqltypes.SMALLINT
# sqltypes.SMALLINT
):
__visit_name__ = ... # type: Any
def __init__(self, display_width=..., **kw) -> None: ...
class BIT(object,
## sqltypes.TypeEngine
# sqltypes.TypeEngine
):
__visit_name__ = ... # type: Any
length = ... # type: Any
@@ -120,7 +120,7 @@ class BIT(object,
def result_processor(self, dialect, coltype): ...
class TIME(object,
## sqltypes.TIME
# sqltypes.TIME
):
__visit_name__ = ... # type: Any
fsp = ... # type: Any
@@ -128,28 +128,28 @@ class TIME(object,
def result_processor(self, dialect, coltype): ...
class TIMESTAMP(object,
## sqltypes.TIMESTAMP
# sqltypes.TIMESTAMP
):
__visit_name__ = ... # type: Any
fsp = ... # type: Any
def __init__(self, timezone=..., fsp=...) -> None: ...
class DATETIME(object,
## sqltypes.DATETIME
# sqltypes.DATETIME
):
__visit_name__ = ... # type: Any
fsp = ... # type: Any
def __init__(self, timezone=..., fsp=...) -> None: ...
class YEAR(object,
## sqltypes.TypeEngine
# sqltypes.TypeEngine
):
__visit_name__ = ... # type: Any
display_width = ... # type: Any
def __init__(self, display_width=...) -> None: ...
class TEXT(_StringType,
## sqltypes.TEXT
# sqltypes.TEXT
):
__visit_name__ = ... # type: Any
def __init__(self, length=..., **kw) -> None: ...
@@ -167,41 +167,41 @@ class LONGTEXT(_StringType):
def __init__(self, **kwargs) -> None: ...
class VARCHAR(_StringType,
## sqltypes.VARCHAR
# sqltypes.VARCHAR
):
__visit_name__ = ... # type: Any
def __init__(self, length=..., **kwargs) -> None: ...
class CHAR(_StringType,
## sqltypes.CHAR
# sqltypes.CHAR
):
__visit_name__ = ... # type: Any
def __init__(self, length=..., **kwargs) -> None: ...
class NVARCHAR(_StringType,
## sqltypes.NVARCHAR
# sqltypes.NVARCHAR
):
__visit_name__ = ... # type: Any
def __init__(self, length=..., **kwargs) -> None: ...
class NCHAR(_StringType,
## sqltypes.NCHAR
# sqltypes.NCHAR
):
__visit_name__ = ... # type: Any
def __init__(self, length=..., **kwargs) -> None: ...
class TINYBLOB(object,
## sqltypes._Binary
# sqltypes._Binary
):
__visit_name__ = ... # type: Any
class MEDIUMBLOB(object,
## sqltypes._Binary
# sqltypes._Binary
):
__visit_name__ = ... # type: Any
class LONGBLOB(object,
## sqltypes._Binary
# sqltypes._Binary
):
__visit_name__ = ... # type: Any
@@ -260,12 +260,12 @@ colspecs = ... # type: Any
ischema_names = ... # type: Any
class MySQLExecutionContext(object,
## default.DefaultExecutionContext
# default.DefaultExecutionContext
):
def should_autocommit_text(self, statement): ...
class MySQLCompiler(object,
## compiler.SQLCompiler
# compiler.SQLCompiler
):
render_table_with_column_in_update_from = ... # type: Any
extract_map = ... # type: Any
@@ -289,7 +289,7 @@ class MySQLCompiler(object,
def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ...
class MySQLDDLCompiler(object,
## compiler.DDLCompiler
# compiler.DDLCompiler
):
def create_table_constraints(self, table, **kw): ...
def get_column_specification(self, column, **kw): ...
@@ -301,7 +301,7 @@ class MySQLDDLCompiler(object,
def define_constraint_match(self, constraint): ...
class MySQLTypeCompiler(object,
## compiler.GenericTypeCompiler
# compiler.GenericTypeCompiler
):
def visit_NUMERIC(self, type_, **kw): ...
def visit_DECIMAL(self, type_, **kw): ...
@@ -339,13 +339,13 @@ class MySQLTypeCompiler(object,
def visit_BOOLEAN(self, type, **kw): ...
class MySQLIdentifierPreparer(object,
## compiler.IdentifierPreparer
# compiler.IdentifierPreparer
):
reserved_words = ... # type: Any
def __init__(self, dialect, server_ansiquotes=..., **kw) -> None: ...
class MySQLDialect(object,
## default.DefaultDialect
# default.DefaultDialect
):
name = ... # type: Any
supports_alter = ... # type: Any

View File

@@ -5,7 +5,7 @@
from typing import Any
from .. import dialects
## registry = dialects.registry
# registry = dialects.registry
class URL:
drivername = ... # type: Any

View File

@@ -3,54 +3,54 @@
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
## from . import mapper
## from . import interfaces
## from . import deprecated_interfaces
## from . import util
## from . import properties
## from . import relationships
## from . import descriptor_props
# from . import mapper
# from . import interfaces
# from . import deprecated_interfaces
# from . import util
# from . import properties
# from . import relationships
# from . import descriptor_props
from . import session
## from . import scoping
## from . import query
# from . import scoping
# from . import query
from ..util import langhelpers
## from . import strategy_options
# from . import strategy_options
## Mapper = mapper.Mapper
## class_mapper = mapper.class_mapper
## configure_mappers = mapper.configure_mappers
## reconstructor = mapper.reconstructor
## validates = mapper.validates
## EXT_CONTINUE = interfaces.EXT_CONTINUE
## EXT_STOP = interfaces.EXT_STOP
## PropComparator = interfaces.PropComparator
## MapperExtension = deprecated_interfaces.MapperExtension
## SessionExtension = deprecated_interfaces.SessionExtension
## AttributeExtension = deprecated_interfaces.AttributeExtension
## aliased = util.aliased
## join = util.join
## object_mapper = util.object_mapper
## outerjoin = util.outerjoin
## polymorphic_union = util.polymorphic_union
## was_deleted = util.was_deleted
## with_parent = util.with_parent
## with_polymorphic = util.with_polymorphic
## ColumnProperty = properties.ColumnProperty
## RelationshipProperty = relationships.RelationshipProperty
## ComparableProperty = descriptor_props.ComparableProperty
## CompositeProperty = descriptor_props.CompositeProperty
## SynonymProperty = descriptor_props.SynonymProperty
## foreign = relationships.foreign
## remote = relationships.remote
# Mapper = mapper.Mapper
# class_mapper = mapper.class_mapper
# configure_mappers = mapper.configure_mappers
# reconstructor = mapper.reconstructor
# validates = mapper.validates
# EXT_CONTINUE = interfaces.EXT_CONTINUE
# EXT_STOP = interfaces.EXT_STOP
# PropComparator = interfaces.PropComparator
# MapperExtension = deprecated_interfaces.MapperExtension
# SessionExtension = deprecated_interfaces.SessionExtension
# AttributeExtension = deprecated_interfaces.AttributeExtension
# aliased = util.aliased
# join = util.join
# object_mapper = util.object_mapper
# outerjoin = util.outerjoin
# polymorphic_union = util.polymorphic_union
# was_deleted = util.was_deleted
# with_parent = util.with_parent
# with_polymorphic = util.with_polymorphic
# ColumnProperty = properties.ColumnProperty
# RelationshipProperty = relationships.RelationshipProperty
# ComparableProperty = descriptor_props.ComparableProperty
# CompositeProperty = descriptor_props.CompositeProperty
# SynonymProperty = descriptor_props.SynonymProperty
# foreign = relationships.foreign
# remote = relationships.remote
Session = session.Session
object_session = Session.object_session
sessionmaker = session.sessionmaker
## make_transient = session.make_transient
## make_transient_to_detached = session.make_transient_to_detached
## scoped_session = scoping.scoped_session
## AliasOption = query.AliasOption
## Query = query.Query
## Bundle = query.Bundle
# make_transient = session.make_transient
# make_transient_to_detached = session.make_transient_to_detached
# scoped_session = scoping.scoped_session
# AliasOption = query.AliasOption
# Query = query.Query
# Bundle = query.Bundle
public_factory = langhelpers.public_factory
def create_session(bind=..., **kwargs): ...
@@ -87,7 +87,7 @@ immediateload = ... # type: Any
noload = ... # type: Any
defaultload = ... # type: Any
## Load = strategy_options.Load
# Load = strategy_options.Load
def eagerload(*args, **kwargs): ...
def eagerload_all(*args, **kwargs): ...