Skip to content

Make it work for async functions#80

Merged
47thomasj merged 3 commits into
devfrom
MakeItWorkForAsync
Jul 14, 2026
Merged

Make it work for async functions#80
47thomasj merged 3 commits into
devfrom
MakeItWorkForAsync

Conversation

@BlazeDrake

Copy link
Copy Markdown
Contributor

I'm getting some asyncio errors from auditor in its runs. The cause seems to be bug reporter calling asyncio.run when that's how auditor is ran already. This pr should fix that by just awaiting the async function directly if it's already in an async thread.

@jgchris jgchris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the returned function from the decorator stay async now? Before it was making it appear like a synchronous function that just happened to return a coroutine. It would be really nice if it had the right metadata to be an async function.

@47thomasj
47thomasj merged commit 435bcf5 into dev Jul 14, 2026
2 checks passed
@47thomasj
47thomasj deleted the MakeItWorkForAsync branch July 14, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants