add async124 async-function-could-be-sync#309
Conversation
6f2e070 to
d40b064
Compare
Zac-HD
left a comment
There was a problem hiding this comment.
Implementation looks good, but I'm pretty concerned about the false-alarm rate.
- Let's also exclude methods on a class; in those cases it's reasonably likely that it 'has to be async' in order to match the interface of some other type
- If there's a convenient way to try it out we could get some empirical feedback? I can't think of one though.
Hmhm, I also feel like this would lose a bunch of the upside of it. Maybe a separate error code?
push a release and wait for complaints? 😆 |
|
after messing around in trio:
|
Zac-HD
left a comment
There was a problem hiding this comment.
Looks good to me; optional nitpick below.
|
I'm also inclined to include FastAPI support in the default no-checkpoint-decorators; reducing the low-value-alarm rate for users is more important than my personal distaste for missing checkpoints 😅. That can easily go in a future PR though. |
hrm. suppressing it for async124 makes lots of sense, but less so for async9xx... if they got suppressed for cases where async124 would get suppressed >_< |
opened #313 to procrastinate on this while I have way-too-many-balls in the air simultaneously 😇 |
|
So this one fell by the wayside for.. no real reason. But I've merged main and done some minor edits, I'll merge it in a couple days unless somebody has any comments |
fixes #253
given that converting an async test to a sync test will give weird errors agronholm/anyio#803 pytest-dev/pytest#10839 we should probably err on the side of not erroring, at least until pytest/anyio is fixed,
which would extend to 910 and 911.