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

Incorrect context definition for asynchronous function #2037

Open
oliversen opened this issue Nov 13, 2024 · 0 comments
Open

Incorrect context definition for asynchronous function #2037

oliversen opened this issue Nov 13, 2024 · 0 comments
Labels

Comments

@oliversen
Copy link

Code for reproduction:

import jedi

code = """
async def foo():
    return None
"""

script = jedi.Script(code)
context = script.get_context(3, 5)
print(context.type)  # `module` when it should be `function`

Jedi v0.19.2
Python v3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants