Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python async functions #93

Closed
LanderMoerkerke opened this issue Aug 30, 2020 · 2 comments
Closed

Python async functions #93

LanderMoerkerke opened this issue Aug 30, 2020 · 2 comments
Assignees
Labels
feature New feature or request

Comments

@LanderMoerkerke
Copy link
Contributor

LanderMoerkerke commented Aug 30, 2020

Describe the solution you'd like

Only sync functions are supported in Python. It would be nice to also include async functions in the detection algorithm.

eg:

async def test(a: int) -> bool:
    pass

Additional context

I tried to update the regex myself but the \m at the start throws me off since it is not valid regex.

\m(async )?def\s\+\%([^(]\+\)\s*(\(.\{-}\))\%(\s*->\s*\(.\{-}\)\)\?\s*:

Edit:

I'm currently reading the contribution guidelines, shouldn't be hard to implement these. Also, I now see the use of \m 😅

@kkoomen
Copy link
Owner

kkoomen commented Sep 2, 2020

Your regex is in Perl style, not in Vim style. I'll have a look at this later.

@kkoomen kkoomen self-assigned this Sep 2, 2020
@kkoomen kkoomen added the feature New feature or request label Sep 2, 2020
@kkoomen
Copy link
Owner

kkoomen commented Sep 2, 2020

This feature has been merged and released in v2.8.0.

Feel free to submit any new issues if you experience any unwanted behavior in the future. Thanks for your contribution.

@kkoomen kkoomen closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants