Skip to content

Commit 03ae541

Browse files
committed
Remove zimports and flake from pre-commit, run black
Fixes: #250
1 parent 8635071 commit 03ae541

22 files changed

+6
-63
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,3 @@ repos:
88
types: [file]
99
files: \.(py|pyi)$
1010

11-
- repo: https://github.com/sqlalchemyorg/zimports
12-
rev: v0.4.0
13-
hooks:
14-
- id: zimports
15-
types: [file]
16-
files: \.(py|pyi)$
17-
18-
- repo: https://github.com/pycqa/flake8
19-
rev: 3.9.2
20-
hooks:
21-
- id: flake8
22-
types: [file]
23-
files: \.(py|pyi)$
24-
additional_dependencies:
25-
- flake8-import-order
26-
- flake8-pyi
27-
28-
29-

sqlalchemy-stubs/dialects/postgresql/asyncpg.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class AsyncAdapt_asyncpg_dbapi:
148148
paramstyle: str = ...
149149
def __init__(self, asyncpg: Any) -> None: ...
150150
def connect(self, *arg: Any, **kw: Any): ...
151-
152151
class Error(Exception): ...
153152
class Warning(Exception): ...
154153
class InterfaceError(Error): ...
@@ -160,10 +159,8 @@ class AsyncAdapt_asyncpg_dbapi:
160159
class DataError(DatabaseError): ...
161160
class NotSupportedError(DatabaseError): ...
162161
class InternalServerError(InternalError): ...
163-
164162
class InvalidCachedStatementError(NotSupportedError):
165163
def __init__(self, message: Any) -> None: ...
166-
167164
def Binary(self, value: Any): ...
168165
STRING: Any = ...
169166
TIMESTAMP: Any = ...

sqlalchemy-stubs/dialects/postgresql/base.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ class ENUM(type_api.NativeForEmulated, sqltypes.Enum):
109109
def drop(
110110
self, bind: Optional[Any] = ..., checkfirst: bool = ...
111111
) -> None: ...
112-
113112
class EnumGenerator(DDLBase):
114113
checkfirst: Any = ...
115114
def __init__(
@@ -120,7 +119,6 @@ class ENUM(type_api.NativeForEmulated, sqltypes.Enum):
120119
**kwargs: Any,
121120
) -> None: ...
122121
def visit_enum(self, enum: Any) -> None: ...
123-
124122
class EnumDropper(DDLBase):
125123
checkfirst: Any = ...
126124
def __init__(

sqlalchemy-stubs/dialects/postgresql/hstore.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine):
88
hashable: bool = ...
99
text_type: Any = ...
1010
def __init__(self, text_type: Optional[Any] = ...) -> None: ...
11-
1211
class Comparator(
1312
sqltypes.Indexable.Comparator, sqltypes.Concatenable.Comparator
1413
):

sqlalchemy-stubs/dialects/postgresql/json.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class JSON(sqltypes.JSON):
1212
def __init__(
1313
self, none_as_null: bool = ..., astext_type: Optional[Any] = ...
1414
) -> None: ...
15-
1615
class Comparator(sqltypes.JSON.Comparator):
1716
@property
1817
def astext(self): ...

sqlalchemy-stubs/engine/base.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ class Engine(_EngineTypingCommon, Connectable, log.Identified):
198198
) -> None: ...
199199
def execution_options(self, **opt: Any) -> OptionEngine: ...
200200
def dispose(self) -> None: ...
201-
202201
class _trans_ctx:
203202
conn: Connection = ...
204203
transaction: Transaction = ...
@@ -211,7 +210,6 @@ class Engine(_EngineTypingCommon, Connectable, log.Identified):
211210
) -> None: ...
212211
def __enter__(self) -> Connection: ...
213212
def __exit__(self, type_: Any, value: Any, traceback: Any) -> None: ...
214-
215213
def begin(self, close_with_result: bool = ...) -> _trans_ctx: ...
216214
def transaction(
217215
self,

sqlalchemy-stubs/engine/result.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class Result(_WithKeys, ResultInternal):
6565
def __next__(self) -> Row: ...
6666
if sys.version_info < (3, 0):
6767
def next(self) -> Row: ...
68-
6968
def partitions(self, size: Optional[int] = ...) -> Iterator[List[Row]]: ...
7069
def fetchall(self) -> List[Row]: ...
7170
def fetchone(self) -> Optional[Row]: ...
@@ -95,7 +94,6 @@ class ScalarResult(FilterResult):
9594
def __next__(self) -> Any: ...
9695
if sys.version_info < (3, 0):
9796
def next(self) -> Any: ...
98-
9997
def first(self) -> Optional[Any]: ...
10098
def one_or_none(self) -> Optional[Any]: ...
10199
def one(self) -> Any: ...
@@ -121,7 +119,6 @@ class MappingResult(_WithKeys, FilterResult):
121119
def __next__(self) -> Mapping[Any, Any]: ...
122120
if sys.version_info < (3, 0):
123121
def next(self) -> Mapping[Any, Any]: ...
124-
125122
def first(self) -> Optional[Mapping[Any, Any]]: ...
126123
def one_or_none(self) -> Optional[Mapping[Any, Any]]: ...
127124
def one(self) -> Mapping[Any, Any]: ...

sqlalchemy-stubs/ext/asyncio/engine.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ class AsyncConnection(
126126
class AsyncEngine(_EngineTypingCommon, ProxyComparable, AsyncConnectable):
127127
@property
128128
def engine(self: _TEngine) -> _TEngine: ...
129-
130129
class _trans_ctx(StartableContext[AsyncConnection]):
131130
conn: AsyncConnection = ...
132131
def __init__(self, conn: AsyncConnection) -> None: ...

sqlalchemy-stubs/future/engine.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,12 @@ class Engine(_LegacyEngine):
8888
def scalar(self, *arg: Any, **kw: Any) -> NoReturn: ...
8989
def table_names(self, *arg: Any, **kw: Any) -> NoReturn: ...
9090
def has_table(self, *arg: Any, **kw: Any) -> NoReturn: ...
91-
9291
class _trans_ctx:
9392
conn: Connection = ...
9493
def __init__(self, conn: Connection) -> None: ...
9594
transaction: Transaction = ...
9695
def __enter__(self) -> Connection: ...
9796
def __exit__(self, type_: Any, value: Any, traceback: Any) -> None: ...
98-
9997
def begin(self) -> _trans_ctx: ... # type: ignore[override]
10098
def connect(self) -> Connection: ... # type: ignore[override]
10199

sqlalchemy-stubs/orm/descriptor_props.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@ class CompositeProperty(DescriptorProperty[_T]):
3737
@property
3838
def columns(self): ...
3939
def get_history(self, state: Any, dict_: Any, passive: Any = ...): ...
40-
4140
class CompositeBundle(orm_util.Bundle):
4241
property: Any = ...
4342
def __init__(self, property_: Any, expr: Any) -> None: ...
4443
def create_row_processor(
4544
self, query: Any, procs: Any, labels: Any
4645
): ...
47-
4846
class Comparator(PropComparator):
4947
__hash__: Any = ...
5048
@util.memoized_property

0 commit comments

Comments
 (0)