Skip to content

Incorrect context definition for asynchronous function #2037

Open
@oliversen

Description

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

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions