Skip to content

Commit ac02cfd

Browse files
committed
Fix grammar in deprecation warnings
1 parent 3f9d03d commit ac02cfd

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

sqlmodel/ext/asyncio/session.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def exec(
105105
🚨 You probably want to use `session.exec()` instead of `session.execute()`.
106106
107107
This is the original SQLAlchemy `session.execute()` method that returns objects
108-
of type `Row`, and that you have to call `scalars()` to get the model objects.
108+
of type `Row`, on which you have to call `scalars()` to get the model objects.
109109
110110
For example:
111111
@@ -114,7 +114,7 @@ async def exec(
114114
heroes = result.scalars().all()
115115
```
116116
117-
instead you could use `exec()`:
117+
Instead, you could use `exec()`:
118118
119119
```Python
120120
result = await session.exec(select(Hero))
@@ -136,7 +136,7 @@ async def execute(
136136
🚨 You probably want to use `session.exec()` instead of `session.execute()`.
137137
138138
This is the original SQLAlchemy `session.execute()` method that returns objects
139-
of type `Row`, and that you have to call `scalars()` to get the model objects.
139+
of type `Row`, on which you have to call `scalars()` to get the model objects.
140140
141141
For example:
142142
@@ -145,7 +145,7 @@ async def execute(
145145
heroes = result.scalars().all()
146146
```
147147
148-
instead you could use `exec()`:
148+
Instead, you could use `exec()`:
149149
150150
```Python
151151
result = await session.exec(select(Hero))

sqlmodel/orm/session.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ def exec(
8989
🚨 You probably want to use `session.exec()` instead of `session.execute()`.
9090
9191
This is the original SQLAlchemy `session.execute()` method that returns objects
92-
of type `Row`, and that you have to call `scalars()` to get the model objects.
92+
of type `Row`, on which you have to call `scalars()` to get the model objects.
9393
9494
For example:
9595
9696
```Python
9797
heroes = session.execute(select(Hero)).scalars().all()
9898
```
9999
100-
instead you could use `exec()`:
100+
Instead, you could use `exec()`:
101101
102102
```Python
103103
heroes = session.exec(select(Hero)).all()
@@ -119,15 +119,15 @@ def execute(
119119
🚨 You probably want to use `session.exec()` instead of `session.execute()`.
120120
121121
This is the original SQLAlchemy `session.execute()` method that returns objects
122-
of type `Row`, and that you have to call `scalars()` to get the model objects.
122+
of type `Row`, on which you have to call `scalars()` to get the model objects.
123123
124124
For example:
125125
126126
```Python
127127
heroes = session.execute(select(Hero)).scalars().all()
128128
```
129129
130-
instead you could use `exec()`:
130+
Instead, you could use `exec()`:
131131
132132
```Python
133133
heroes = session.exec(select(Hero)).all()
@@ -146,10 +146,10 @@ def execute(
146146
"""
147147
🚨 You probably want to use `session.exec()` instead of `session.query()`.
148148
149-
`session.exec()` is SQLModel's own short version with increased type
149+
`session.exec()` is SQLModel's own short version with improved type
150150
annotations.
151151
152-
Or otherwise you might want to use `session.execute()` instead of
152+
Otherwise, you might want to use `session.execute()` instead of
153153
`session.query()`.
154154
"""
155155
)
@@ -159,10 +159,10 @@ def query( # type: ignore
159159
"""
160160
🚨 You probably want to use `session.exec()` instead of `session.query()`.
161161
162-
`session.exec()` is SQLModel's own short version with increased type
162+
`session.exec()` is SQLModel's own short version with improved type
163163
annotations.
164164
165-
Or otherwise you might want to use `session.execute()` instead of
165+
Otherwise, you might want to use `session.execute()` instead of
166166
`session.query()`.
167167
"""
168168
return super().query(*entities, **kwargs)

0 commit comments

Comments
 (0)