Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
# 427 F811 redefinition
# 356 E305 expected 2 blank lines

# Also ignored because stubs use a different style:
# E251 unexpected spaces around keyword / parameter equals

# Nice-to-haves ignored for now
# 152 E128 continuation line under-indented for visual indent
# 43 E127 continuation line over-indented for visual indent

[flake8]
ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704, B303
ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704, B303, E251
# We are checking with Python 3 but many of the stubs are Python 2 stubs.
# A nice future improvement would be to provide separate .flake8
# configurations for Python 2 and Python 3 files.
Expand Down
247 changes: 136 additions & 111 deletions third_party/2and3/sqlalchemy/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,124 +1,149 @@
# Stubs for sqlalchemy (Python 2)
# Stubs for sqlalchemy (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from .sql import (
alias,
and_,
asc,
between,
bindparam,
case,
cast,
collate,
column,
delete,
desc,
distinct,
except_,
except_all,
exists,
extract,
false,
func,
funcfilter,
insert,
intersect,
intersect_all,
join,
literal,
literal_column,
modifier,
not_,
null,
or_,
outerjoin,
outparam,
over,
select,
subquery,
table,
text,
true,
tuple_,
type_coerce,
union,
union_all,
update,
alias as alias,
all_ as all_,
and_ as and_,
any_ as any_,
asc as asc,
between as between,
bindparam as bindparam,
case as case,
cast as cast,
collate as collate,
column as column,
delete as delete,
desc as desc,
distinct as distinct,
except_ as except_,
except_all as except_all,
exists as exists,
extract as extract,
false as false,
func as func,
funcfilter as funcfilter,
insert as insert,
intersect as intersect,
intersect_all as intersect_all,
join as join,
lateral as lateral,
literal as literal,
literal_column as literal_column,
modifier as modifier,
not_ as not_,
null as null,
or_ as or_,
outerjoin as outerjoin,
outparam as outparam,
over as over,
select as select,
subquery as subquery,
table as table,
tablesample as tablesample,
text as text,
true as true,
tuple_ as tuple_,
type_coerce as type_coerce,
union as union,
union_all as union_all,
update as update,
within_group as within_group
)

from .types import (
BIGINT,
BINARY,
BLOB,
BOOLEAN,
BigInteger,
Binary,
Boolean,
CHAR,
CLOB,
DATE,
DATETIME,
DECIMAL,
Date,
DateTime,
Enum,
FLOAT,
Float,
INT,
INTEGER,
Integer,
Interval,
LargeBinary,
NCHAR,
NVARCHAR,
NUMERIC,
Numeric,
PickleType,
REAL,
SMALLINT,
SmallInteger,
String,
TEXT,
TIME,
TIMESTAMP,
Text,
Time,
TypeDecorator,
Unicode,
UnicodeText,
VARBINARY,
VARCHAR,
ARRAY as ARRAY,
BIGINT as BIGINT,
BINARY as BINARY,
BLOB as BLOB,
BOOLEAN as BOOLEAN,
BigInteger as BigInteger,
Binary as Binary,
Boolean as Boolean,
CHAR as CHAR,
CLOB as CLOB,
DATE as DATE,
DATETIME as DATETIME,
DECIMAL as DECIMAL,
Date as Date,
DateTime as DateTime,
Enum as Enum,
FLOAT as FLOAT,
Float as Float,
INT as INT,
INTEGER as INTEGER,
Integer as Integer,
Interval as Interval,
JSON as JSON,
LargeBinary as LargeBinary,
NCHAR as NCHAR,
NVARCHAR as NVARCHAR,
NUMERIC as NUMERIC,
Numeric as Numeric,
PickleType as PickleType,
REAL as REAL,
SMALLINT as SMALLINT,
SmallInteger as SmallInteger,
String as String,
TEXT as TEXT,
TIME as TIME,
TIMESTAMP as TIMESTAMP,
Text as Text,
Time as Time,
TypeDecorator as TypeDecorator,
Unicode as Unicode,
UnicodeText as UnicodeText,
VARBINARY as VARBINARY,
VARCHAR as VARCHAR
)

from .schema import (
CheckConstraint,
Column,
ColumnDefault,
Constraint,
DefaultClause,
FetchedValue,
ForeignKey,
ForeignKeyConstraint,
Index,
MetaData,
PassiveDefault,
PrimaryKeyConstraint,
Sequence,
Table,
ThreadLocalMetaData,
UniqueConstraint,
DDL,
CheckConstraint as CheckConstraint,
Column as Column,
ColumnDefault as ColumnDefault,
Constraint as Constraint,
DefaultClause as DefaultClause,
FetchedValue as FetchedValue,
ForeignKey as ForeignKey,
ForeignKeyConstraint as ForeignKeyConstraint,
Index as Index,
MetaData as MetaData,
PassiveDefault as PassiveDefault,
PrimaryKeyConstraint as PrimaryKeyConstraint,
Sequence as Sequence,
Table as Table,
ThreadLocalMetaData as ThreadLocalMetaData,
UniqueConstraint as UniqueConstraint,
DDL as DDL,
BLANK_SCHEMA as BLANK_SCHEMA
)

from .inspection import inspect as inspect

from .engine import (
create_engine as create_engine,
engine_from_config as engine_from_config
)

from . import connectors as connectors
from . import databases as databases
from . import dialects as dialects
from . import engine as engine
from . import event as event
from . import ext as ext
from . import orm as orm
from . import sql as sql
from . import schema as schema
from . import types as types
from . import util as util
from . import cprocessors as cprocessors
from . import cresultproxy as cresultproxy
from . import cutils as cutils
from . import events as events
from . import exc as exc
from . import dialects as dialects
from . import inspection as inspection
from . import interfaces as interfaces
from . import log as log
from . import pool as pool
# This should re-export orm but orm is totally broken right now
# from . import orm as orm

from .inspection import inspect
from .engine import create_engine, engine_from_config

__version__ = ... # type: int
from . import processors as processors
from . import schema as schema
from . import types as types
9 changes: 9 additions & 0 deletions third_party/2and3/sqlalchemy/connectors/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Stubs for sqlalchemy.connectors (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from . import mxodbc as mxodbc
from . import pyodbc as pyodbc
from . import zxJDBC as zxJDBC

class Connector(object): ...
20 changes: 20 additions & 0 deletions third_party/2and3/sqlalchemy/connectors/mxodbc.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Stubs for sqlalchemy.connectors.mxodbc (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Optional
from . import Connector

class MxODBCConnector(Connector):
driver = ... # type: str
supports_sane_multi_rowcount = ... # type: bool
supports_unicode_statements = ... # type: bool
supports_unicode_binds = ... # type: bool
supports_native_decimal = ... # type: bool
@classmethod
def dbapi(cls): ...
def on_connect(self): ...
def create_connect_args(self, url): ...
def is_disconnect(self, e, connection, cursor): ...
def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ...
def do_execute(self, cursor, statement, parameters, context: Optional[Any] = ...): ...
25 changes: 25 additions & 0 deletions third_party/2and3/sqlalchemy/connectors/pyodbc.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Stubs for sqlalchemy.connectors.pyodbc (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Optional
from . import Connector

class PyODBCConnector(Connector):
driver = ... # type: str
supports_sane_multi_rowcount = ... # type: bool
supports_unicode = ... # type: Any
supports_unicode_statements = ... # type: Any
supports_native_decimal = ... # type: bool
default_paramstyle = ... # type: str
pyodbc_driver_name = ... # type: Any
freetds = ... # type: bool
freetds_driver_version = ... # type: Any
easysoft = ... # type: bool
def __init__(self, supports_unicode_binds: Optional[Any] = ..., **kw) -> None: ...
@classmethod
def dbapi(cls): ...
def create_connect_args(self, url): ...
def is_disconnect(self, e, connection, cursor): ...
supports_unicode_binds = ... # type: Any
def initialize(self, connection): ...
21 changes: 21 additions & 0 deletions third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Stubs for sqlalchemy.connectors.zxJDBC (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any
from . import Connector

class ZxJDBCConnector(Connector):
driver = ... # type: str
supports_sane_rowcount = ... # type: bool
supports_sane_multi_rowcount = ... # type: bool
supports_unicode_binds = ... # type: bool
supports_unicode_statements = ... # type: Any
description_encoding = ... # type: Any
default_paramstyle = ... # type: str
jdbc_db_name = ... # type: Any
jdbc_driver_name = ... # type: Any
@classmethod
def dbapi(cls): ...
def create_connect_args(self, url): ...
def is_disconnect(self, e, connection, cursor): ...
19 changes: 19 additions & 0 deletions third_party/2and3/sqlalchemy/cprocessors.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Stubs for sqlalchemy.cprocessors (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

def int_to_boolean(*args, **kwargs): ...
def str_to_date(*args, **kwargs): ...
def str_to_datetime(*args, **kwargs): ...
def str_to_time(*args, **kwargs): ...
def to_float(*args, **kwargs): ...
def to_str(*args, **kwargs): ...

class DecimalResultProcessor(object):
def __init__(self, *args, **kwargs): ...
def process(self, *args, **kwargs): ...

class UnicodeResultProcessor(object):
def __init__(self, *args, **kwargs): ...
def conditional_process(self, *args, **kwargs): ...
def process(self, *args, **kwargs): ...
19 changes: 19 additions & 0 deletions third_party/2and3/sqlalchemy/cresultproxy.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Stubs for sqlalchemy.cresultproxy (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

def safe_rowproxy_reconstructor(*args, **kwargs): ...

class BaseRowProxy(object):
_keymap = ... # type: Any
_parent = ... # type: Any
_processors = ... # type: Any
_row = ... # type: Any
def __init__(self, *args, **kwargs): ...
def values(self, *args, **kwargs): ...
def __getitem__(self, index): ...
def __iter__(self): ...
def __len__(self, *args, **kwargs): ...
def __reduce__(self): ...
Loading