Skip to content

Commit b35e2bd

Browse files
committed
initial rev
0 parents  commit b35e2bd

File tree

202 files changed

+17851
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+17851
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.pyc
2+
*.pyo
3+
.tox
4+
.mypy_cache
5+
.vscode/
6+
dist/
7+
*.egg-info
8+
9+

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/python/black
5+
rev: 20.8b1
6+
hooks:
7+
- id: black
8+
9+
- repo: https://github.com/sqlalchemyorg/zimports
10+
rev: 0.2.2
11+
hooks:
12+
- id: zimports
13+
14+
- repo: https://github.com/pycqa/flake8
15+
rev: 3.8.4
16+
hooks:
17+
- id: flake8
18+
additional_dependencies:
19+
- flake8-import-order
20+
- flake8-builtins
21+
- flake8-docstrings
22+
- flake8-rst-docstrings
23+
- pydocstyle<4.0.0
24+
- pygments
25+
26+
27+
28+

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright 2005-2021 SQLAlchemy authors and contributors <see AUTHORS file>.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
===================
2+
SQLAlchemy 2 Stubs
3+
===================
4+
5+
These are the PEP-484 typing stubs for SQLAlchemy 1.4 and
6+
SQLAlchemy 2.0, as well as a mypy extension.
7+
8+
This package will be integrated within SQLAlchemy 2 itself
9+
as inline type annotations for SQLAlchemy 2.0's release.
10+
11+
12+
For SQLAlchemy 1.4, the annotations are published here
13+
as separate stubs so that users who are relying upon
14+
the "sqlalchemy-stubs" package published by Dropbox can
15+
continue to do so. This package necessarily replaces
16+
sqlalchemy-stubs entirely, and will be in development
17+
throughout the 1.4 SQLAlchemy series.
18+
19+
This project is **under consruction** right now and initial
20+
releases will be in the coming weeks of 2021.
21+
22+
23+
24+

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tool.black]
2+
line-length = 79
3+
target-version = ['py37']

setup.cfg

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[metadata]
2+
name = sqlalchemy2-stubs
3+
version = 0.0.1a1
4+
description = Typing Stubs for SQLAlchemy 1.4
5+
long_description = file: README.rst
6+
long_description_content_type = text/x-rst
7+
url = http://www.sqlalchemy.org
8+
author = Mike Bayer
9+
author_email = [email protected]
10+
license = MIT
11+
license_file = LICENSE
12+
classifiers =
13+
Development Status :: 3 - Alpha
14+
Intended Audience :: Developers
15+
License :: OSI Approved :: MIT License
16+
Operating System :: OS Independent
17+
Programming Language :: Python :: 3
18+
Programming Language :: Python :: 3.6
19+
Programming Language :: Python :: 3.7
20+
Programming Language :: Python :: 3.8
21+
Programming Language :: Python :: 3.9
22+
Programming Language :: Python :: Implementation :: CPython
23+
Programming Language :: Python :: Implementation :: PyPy
24+
project_urls =
25+
Issue Tracker=https://github.com/sqlalchemy/sqlalchemy2-stubs/
26+
27+
[options]
28+
packages = sqlalchemy-stubs
29+
#include_package_data = true
30+
python_requires = >=3.6
31+
32+
install_requires =
33+
mypy>=0.790
34+
typing-extensions>=3.7.4
35+
36+
[options.package_data]
37+
* = *.pyi
38+
39+
[mypy]
40+
41+
42+
43+
[flake8]
44+
show-source = false
45+
enable-extensions = G
46+
47+
ignore =
48+
A003,
49+
D,
50+
E203,E305,E711,E712,E721,E722,E741,
51+
N801,N802,N806,
52+
RST304,RST303,RST299,RST399,
53+
W503,W504
54+
exclude = .venv,.git,.tox,dist,doc,*egg,build
55+
import-order-style = google
56+
application-import-names = sqlalchemy,test,sqlalchemy-stubs

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from setuptools import setup
2+
3+
setup()

sqlalchemy-stubs/__init__.pyi

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
from .engine import create_engine as create_engine
2+
from .engine import create_mock_engine as create_mock_engine
3+
from .engine import engine_from_config as engine_from_config
4+
from .inspection import inspect as inspect
5+
from .schema import BLANK_SCHEMA as BLANK_SCHEMA
6+
from .schema import CheckConstraint as CheckConstraint
7+
from .schema import Column as Column
8+
from .schema import ColumnDefault as ColumnDefault
9+
from .schema import Computed as Computed
10+
from .schema import Constraint as Constraint
11+
from .schema import DDL as DDL
12+
from .schema import DefaultClause as DefaultClause
13+
from .schema import FetchedValue as FetchedValue
14+
from .schema import ForeignKey as ForeignKey
15+
from .schema import ForeignKeyConstraint as ForeignKeyConstraint
16+
from .schema import Identity as Identity
17+
from .schema import Index as Index
18+
from .schema import MetaData as MetaData
19+
from .schema import PrimaryKeyConstraint as PrimaryKeyConstraint
20+
from .schema import Sequence as Sequence
21+
from .schema import Table as Table
22+
from .schema import ThreadLocalMetaData as ThreadLocalMetaData
23+
from .schema import UniqueConstraint as UniqueConstraint
24+
from .sql import alias as alias
25+
from .sql import all_ as all_
26+
from .sql import and_ as and_
27+
from .sql import any_ as any_
28+
from .sql import asc as asc
29+
from .sql import between as between
30+
from .sql import bindparam as bindparam
31+
from .sql import case as case
32+
from .sql import cast as cast
33+
from .sql import collate as collate
34+
from .sql import column as column
35+
from .sql import delete as delete
36+
from .sql import desc as desc
37+
from .sql import distinct as distinct
38+
from .sql import except_ as except_
39+
from .sql import except_all as except_all
40+
from .sql import exists as exists
41+
from .sql import extract as extract
42+
from .sql import false as false
43+
from .sql import func as func
44+
from .sql import funcfilter as funcfilter
45+
from .sql import insert as insert
46+
from .sql import intersect as intersect
47+
from .sql import intersect_all as intersect_all
48+
from .sql import join as join
49+
from .sql import LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT
50+
from .sql import LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY
51+
from .sql import LABEL_STYLE_NONE as LABEL_STYLE_NONE
52+
from .sql import LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL
53+
from .sql import lambda_stmt as lambda_stmt
54+
from .sql import lateral as lateral
55+
from .sql import literal as literal
56+
from .sql import literal_column as literal_column
57+
from .sql import modifier as modifier
58+
from .sql import not_ as not_
59+
from .sql import null as null
60+
from .sql import nulls_first as nulls_first
61+
from .sql import nulls_last as nulls_last
62+
from .sql import nullsfirst as nullsfirst
63+
from .sql import nullslast as nullslast
64+
from .sql import or_ as or_
65+
from .sql import outerjoin as outerjoin
66+
from .sql import outparam as outparam
67+
from .sql import over as over
68+
from .sql import select as select
69+
from .sql import subquery as subquery
70+
from .sql import table as table
71+
from .sql import tablesample as tablesample
72+
from .sql import text as text
73+
from .sql import true as true
74+
from .sql import tuple_ as tuple_
75+
from .sql import type_coerce as type_coerce
76+
from .sql import union as union
77+
from .sql import union_all as union_all
78+
from .sql import update as update
79+
from .sql import values as values
80+
from .sql import within_group as within_group
81+
from .types import ARRAY as ARRAY
82+
from .types import BIGINT as BIGINT
83+
from .types import BigInteger as BigInteger
84+
from .types import BINARY as BINARY
85+
from .types import BLOB as BLOB
86+
from .types import BOOLEAN as BOOLEAN
87+
from .types import Boolean as Boolean
88+
from .types import CHAR as CHAR
89+
from .types import CLOB as CLOB
90+
from .types import DATE as DATE
91+
from .types import Date as Date
92+
from .types import DATETIME as DATETIME
93+
from .types import DateTime as DateTime
94+
from .types import DECIMAL as DECIMAL
95+
from .types import Enum as Enum
96+
from .types import FLOAT as FLOAT
97+
from .types import Float as Float
98+
from .types import INT as INT
99+
from .types import INTEGER as INTEGER
100+
from .types import Integer as Integer
101+
from .types import Interval as Interval
102+
from .types import JSON as JSON
103+
from .types import LargeBinary as LargeBinary
104+
from .types import NCHAR as NCHAR
105+
from .types import NUMERIC as NUMERIC
106+
from .types import Numeric as Numeric
107+
from .types import NVARCHAR as NVARCHAR
108+
from .types import PickleType as PickleType
109+
from .types import REAL as REAL
110+
from .types import SMALLINT as SMALLINT
111+
from .types import SmallInteger as SmallInteger
112+
from .types import String as String
113+
from .types import TEXT as TEXT
114+
from .types import Text as Text
115+
from .types import TIME as TIME
116+
from .types import Time as Time
117+
from .types import TIMESTAMP as TIMESTAMP
118+
from .types import TypeDecorator as TypeDecorator
119+
from .types import Unicode as Unicode
120+
from .types import UnicodeText as UnicodeText
121+
from .types import VARBINARY as VARBINARY
122+
from .types import VARCHAR as VARCHAR
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class Connector: ...
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from typing import Any
2+
from typing import Optional
3+
4+
from . import Connector as Connector
5+
from ..util import warn_deprecated as warn_deprecated
6+
7+
class MxODBCConnector(Connector):
8+
driver: str = ...
9+
supports_sane_multi_rowcount: bool = ...
10+
supports_unicode_statements: bool = ...
11+
supports_unicode_binds: bool = ...
12+
supports_native_decimal: bool = ...
13+
@classmethod
14+
def dbapi(cls): ...
15+
def on_connect(self): ...
16+
def create_connect_args(self, url: Any): ...
17+
def is_disconnect(self, e: Any, connection: Any, cursor: Any): ...
18+
def do_executemany(
19+
self,
20+
cursor: Any,
21+
statement: Any,
22+
parameters: Any,
23+
context: Optional[Any] = ...,
24+
) -> None: ...
25+
def do_execute(
26+
self,
27+
cursor: Any,
28+
statement: Any,
29+
parameters: Any,
30+
context: Optional[Any] = ...,
31+
) -> None: ...

0 commit comments

Comments
 (0)