Skip to content

Commit 101779f

Browse files
authored
Apply suggestions from code review
minor fixes
1 parent 4146bb4 commit 101779f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

tests/eval_files/async102.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ async def __aexit__():
312312
await foo() # error: 4, Statement("__aexit__", lineno-1)
313313

314314

315-
# exclude finally: await x.aclose()
316-
# trio/anyio marks arg-less aclose() as safe
315+
# exclude `finally: await x.aclose()` with no arguments
317316
async def foo_aclose_noargs():
318317
# no type tracking in this check, we allow any call that looks like
319318
# `await [...].aclose()`
@@ -329,7 +328,7 @@ async def foo_aclose_noargs():
329328
await x.y.aclose()
330329

331330

332-
# trio/anyio should still raise errors if there's args
331+
# should still raise errors if there's args, as that indicates it's a non-standard aclose
333332
async def foo():
334333
# no type tracking in this check
335334
x = None

tests/eval_files/noqa_no_autofix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ async def foo_no_noqa_109(timeout): # ASYNC109: 26, "trio"
1212
...
1313

1414

15-
async def foo_noqa_102(timeout): # noqa: ASYNC109, "trio"
15+
async def foo_noqa_102(timeout): # noqa: ASYNC109
1616
...
1717

1818

19-
async def foo_bare_noqa_109(timeout): # noqa, "trio"
19+
async def foo_bare_noqa_109(timeout): # noqa
2020
...

0 commit comments

Comments
 (0)