Skip to content

Commit 2609096

Browse files
committed
Clarify error messages
1 parent fb30af7 commit 2609096

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

asyncgpio/gpio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ def _update(self):
254254
raise OSError("unable to update state")
255255

256256
def __iter__(self):
257-
raise RuntimeError("You need to use 'async for'")
257+
raise RuntimeError("You need to use 'async for', not 'for'")
258258

259259
def __aenter__(self):
260-
raise RuntimeError("YOu need to use 'with'")
260+
raise RuntimeError("You need to use 'with', not 'async with'")
261261

262262
def __aexit__(self):
263-
raise RuntimeError("YOu need to use 'with'")
263+
raise RuntimeError("You need to use 'with', not 'async with'")
264264

265265
def __aiter__(self):
266266
if self._state != _IN_EV:

0 commit comments

Comments
 (0)