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

Function recognition #6

Open
Ergus opened this issue Jan 11, 2025 · 0 comments
Open

Function recognition #6

Ergus opened this issue Jan 11, 2025 · 0 comments

Comments

@Ergus
Copy link

Ergus commented Jan 11, 2025

Hi:

The current code does not recognize function with specified return types:

def run_some_test() -> int:
    return 32

I think that updating the code with this regex may fix it:

"def[ \t]+\\([a-zA-Z_][a-zA-Z0-9_]*\\)[ \t]*(\\(.*\\))\\([ \t]*->[ \t]*[a-zA-Z0-9_]*\\)?:"

This is the same regex than before, but extended with \\([ \t]*->[ \t]*[a-zA-Z0-9_]*\\)?

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

No branches or pull requests

1 participant