Skip to content

stubgen doesn't generate async function definitions #5844

Closed
@bryanforbes

Description

@bryanforbes

mypy version: 0.641

Given the following file (named test.py):

class Foo:
    async def bar(self):
        return None

async def baz():
    return None

Running stubgen --search-path . test produces out/test.pyi with the following contents:

# Stubs for test (Python 3.7)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

class Foo:
    def bar(self): ...

def baz(): ...

I would expect the output to be:

# Stubs for test (Python 3.7)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

class Foo:
    async def bar(self): ...

async def baz(): ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions