You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I don't need __entries. But mypy generate an error with strict on __entries this is why I include it. I think that stubgen could ignore __entries and not expose this attribute.
It would be useful to add typings of the keys and values of the
__members__
and__entries
dictionary on class that representenum
in C.For example, if we take the same example as #12717.
Compile via:
Run the stub generator:
the result is something like
When we import code with these kinds of stubs and use
mypy
to type checked the code withstrict
option, we have this warning.Expected Behavior
The result of
stubgen
would be like this:Environment
--show-column-numbers --no-error-summary --no-pretty --no-color-output
mypy.ini
(and other config files): strict = trueThe text was updated successfully, but these errors were encountered: