Skip to content

Commit a99a17e

Browse files
committed
Suppress ruff warning in an example
1 parent 852f339 commit a99a17e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/async_call.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def run_async(coro) -> concurrent.futures.Future:
1616
Await a coroutine from a synchronous function/method.
1717
"""
1818

19-
global _event_loop
19+
global _event_loop # noqa: PLW0603
2020

2121
if _event_loop is None:
2222
with _event_lock:
@@ -31,6 +31,7 @@ def run_async(coro) -> concurrent.futures.Future:
3131

3232
return asyncio.run_coroutine_threadsafe(coro, _event_loop)
3333

34+
3435
async def async_wait(duration: float) -> float:
3536
"""
3637
Example async function that is called from a synchronous cmd2 command
@@ -75,4 +76,5 @@ async def main() -> int:
7576

7677
if __name__ == '__main__':
7778
import sys
79+
7880
sys.exit(asyncio.run(main(), debug=True))

0 commit comments

Comments
 (0)