Skip to content

Commit f397826

Browse files
committed
dev
1 parent eaec6f2 commit f397826

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
- repo: https://github.com/sqlalchemyorg/zimports
5-
rev: 0.2.2
6-
hooks:
7-
- id: zimports
8-
types: [file]
9-
files: \.(py|pyi)$
10-
114
- repo: https://github.com/python/black
125
rev: 20.8b1
136
hooks:

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ ignore =
4747
E203,E305,E711,E712,E721,E722,E741,
4848
N801,N802,N806,
4949
RST304,RST303,RST299,RST399,
50+
F401,
5051
W503,W504
5152
exclude = .venv,.git,.tox,dist,doc,*egg,build
5253
import-order-style = google

sqlalchemy-stubs/orm/attributes.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from collections import namedtuple
22
from typing import Any
33
from typing import Generic
44
from typing import Optional
5+
from typing import overload
56
from typing import Type
67
from typing import TypeVar
78

@@ -83,12 +84,11 @@ class QueryableAttribute(
8384
def property(self): ...
8485

8586
_T = TypeVar("_T")
86-
_Generic_T = Generic[_T]
8787

8888
class Mapped(QueryableAttribute, Generic[_T]):
8989
def __init__(self, type: Type[_T]) -> None: ...
9090
@overload
91-
def __get__(self, instance: None, owner: Any) -> Mapped[_T]: ...
91+
def __get__(self, instance: None, owner: Any) -> "Mapped"[_T]: ...
9292
@overload
9393
def __get__(self, instance: object, owner: Any) -> _T: ...
9494
def __set__(self, instance: Any, value: _T) -> None: ...
@@ -312,8 +312,8 @@ class CollectionAttributeImpl(AttributeImpl):
312312
value: Any,
313313
initiator: Optional[Any] = ...,
314314
passive: Any = ...,
315+
check_old: Optional[Any] = ...,
315316
pop: bool = ...,
316-
_adapt: bool = ...,
317317
) -> None: ...
318318
def set_committed_value(self, state: Any, dict_: Any, value: Any): ...
319319
def get_collection(

sqlalchemy-stubs/orm/interfaces.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ from typing import Generic
33
from typing import Optional
44
from typing import TypeVar
55

6-
from .base import _MappedAttribute
6+
from .base import _MappedAttribute as _MappedAttribute
77
from .base import EXT_CONTINUE as EXT_CONTINUE
88
from .base import EXT_SKIP as EXT_SKIP
99
from .base import EXT_STOP as EXT_STOP
10-
from .base import InspectionAttr
10+
from .base import InspectionAttr as InspectionAttr
11+
from .base import InspectionAttrInfo as InspectionAttrInfo # noqa
1112
from .base import MANYTOMANY as MANYTOMANY
1213
from .base import MANYTOONE as MANYTOONE
1314
from .base import NOT_EXTENSION as NOT_EXTENSION
@@ -58,9 +59,10 @@ class MapperProperty(
5859
self,
5960
type_: Any,
6061
state: Any,
61-
visited_instances: Optional[Any] = ...,
62+
dict_: Any,
63+
visited_states: Any,
6264
halt_on: Optional[Any] = ...,
63-
): ...
65+
) -> None: ...
6466
parent: Any = ...
6567
def set_parent(self, parent: Any, init: Any) -> None: ...
6668
def instrument_class(self, mapper: Any) -> None: ...

sqlalchemy-stubs/orm/relationships.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from .interfaces import PropComparator as PropComparator
1313
from .interfaces import StrategizedProperty as StrategizedProperty
1414
from .util import AliasedInsp as AliasedInsp
1515
from .util import CascadeOptions as CascadeOptions
16+
from .mapper import Mapper
1617
from .. import log as log
1718
from .. import schema as schema
1819
from .. import sql as sql
@@ -152,7 +153,7 @@ class RelationshipProperty(StrategizedProperty[_T]):
152153
visited_states: Any,
153154
halt_on: Optional[Any] = ...,
154155
) -> None: ...
155-
def entity(self) -> Union[AliasedInsp, mapperlib.Mapper]: ...
156+
def entity(self) -> Union[AliasedInsp, Mapper]: ...
156157
def mapper(self): ...
157158
def do_init(self) -> None: ...
158159
@property

sqlalchemy-stubs/orm/session.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
from typing import Any
2-
from typing import Optional
3-
41
from .. import util
2+
from typing import Any, Optional
53

64
class _SessionClassMethods:
75
@classmethod
@@ -247,3 +245,8 @@ class sessionmaker(_SessionClassMethods):
247245
def begin(self): ...
248246
def __call__(self, **local_kw: Any): ...
249247
def configure(self, **new_kw: Any) -> None: ...
248+
249+
def close_all_sessions() -> Any: ...
250+
def make_transient(instance: object) -> Any: ...
251+
def make_transient_to_detached(instance: object) -> Any: ...
252+
def object_session(instance: object) -> Any: ...

0 commit comments

Comments
 (0)