Skip to content

stubgen doesn't generate async function definitions #5844

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

Closed
bryanforbes opened this issue Oct 26, 2018 · 2 comments
Closed

stubgen doesn't generate async function definitions #5844

bryanforbes opened this issue Oct 26, 2018 · 2 comments
Labels
bug mypy got something wrong priority-1-normal

Comments

@bryanforbes
Copy link
Contributor

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(): ...
@gvanrossum
Copy link
Member

That's a good catch. Do you want to try creating a PR to fix it?

@gvanrossum gvanrossum added the bug mypy got something wrong label Oct 26, 2018
@bryanforbes
Copy link
Contributor Author

Yeah, I'll give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-1-normal
Projects
None yet
Development

No branches or pull requests

3 participants