mutmut icon indicating copy to clipboard operation
mutmut copied to clipboard

fix: addition of the keywords async and await for generated asynchronous functions

Open Julien-Delavisse opened this issue 3 weeks ago • 2 comments

Close #454

Julien-Delavisse avatar Dec 02 '25 19:12 Julien-Delavisse

Hi, as stated in the issue I don't yet understand why this is necessary, so I won't merge this for now.

If you can provide a minimal repro, that would be nice to have in the issue. Or an e2e test that would fail without your change and pass with it.

And you'd need to rebase the main branch to get the tests passing, the uv.lock file has not been updated correctly in the last release. I've pushed a fix for that.

Otto-AA avatar Dec 02 '25 20:12 Otto-AA

Hi @Julien-Delavisse , thanks for the PR. There are still some changes required, do you want to work on them or should I finish this PR when I find the time to do so?

In particular:

  • the e2e test for "my_lib" fails, we need to fix it when "async for" is used: "FAILED tests/test_my_lib.py::test_async_consumer - TypeError: 'async for' requires an object with aiter method, got coroutine"
  • some other tests fail. I did not look into it much, but I guess that's just some tests that need to be updated / additional spaces introduced by your code
  • it would be nice to have an e2e test for the issue solved by this PR, similar to the example in the issue (see contributing.md on how to update e2e snapshot tests)

The first two need to be done before merging, so we don't break existing use cases. The new e2e test would be nice to have, but is not essential. Feel free to work on whatever you want, if you need some pointers let me know :)

Otto-AA avatar Dec 03 '25 16:12 Otto-AA