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
### Description
This PR fixes#12072 by correctly handling `Protocol` definitions. Previously, the `Protocol` base class was removed when generating type stubs which causes problems with other packages that want to use type definition (because they see it as a regular class, not as a `Protocol`).
## Test Plan
Added a testcase to the stubgen testset.
Co-authored-by: 97littleleaf11 <[email protected]>
Bug Report
Consider the following input:
stubgen
produces:Note that the
Protocol
class is removed from the list of base classes.Obviously this causes problems when performing type checking against users of that generated typestub:
mypy:
Expected Behavior
Protocol
base class is not removed.Actual Behavior
Protocol
base class is removed.Your Environment
The text was updated successfully, but these errors were encountered: