Skip to content

Commit

Permalink
[flake8-async] Fix examples to use async with (#12924)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Aug 16, 2024
1 parent d8debb7 commit 9b73532
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::rules::flake8_async::helpers::AsyncModule;
///
///
/// async def main():
/// with asyncio.timeout(2):
/// async with asyncio.timeout(2):
/// await long_running_task()
/// ```
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ use crate::rules::flake8_async::helpers::MethodName;
/// ## Example
/// ```python
/// async def func():
/// with asyncio.timeout(2):
/// async with asyncio.timeout(2):
/// do_something()
/// ```
///
/// Use instead:
/// ```python
/// async def func():
/// with asyncio.timeout(2):
/// async with asyncio.timeout(2):
/// do_something()
/// await awaitable()
/// ```
Expand Down

0 comments on commit 9b73532

Please sign in to comment.