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

Stubgen does not copy total attribute from TypedDict #15195

Closed
bramstroker opened this issue May 6, 2023 · 1 comment · Fixed by #15208
Closed

Stubgen does not copy total attribute from TypedDict #15195

bramstroker opened this issue May 6, 2023 · 1 comment · Fixed by #15208
Labels
bug mypy got something wrong

Comments

@bramstroker
Copy link

bramstroker commented May 6, 2023

Bug Report

When using stubgen the total attribute of TypedDict is lost.

To Reproduce

Assuming the following example

from typing import TypedDict

class MyDict(TypedDict, total=False):
    foo: str
    bar: int

After running stubgen we get the following output:

from typing import TypedDict

class MyDict(TypedDict):
    foo: str
    bar: int

Expected Behavior

The type signature matches the original method and total attribute is kept.

Actual Behavior

total attribute is lost

Your Environment

  • Python 3.10
  • MyPy 1.2.0
@bramstroker
Copy link
Author

Thanks for the quick fix. Working correctly when I use stubgen of the master branch now.

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

Successfully merging a pull request may close this issue.

1 participant