Add an undocumented "trait" class decorator to mypy_extensions (#5278) This is an undocumented and extremely experimental annotation to support a restricted for of multiple inheritance for `mypyc`.
diff --git a/mypy_extensions.py b/mypy_extensions.py index 056b1bf..0fc3b43 100644 --- a/mypy_extensions.py +++ b/mypy_extensions.py
@@ -135,3 +135,7 @@ # Return type that indicates a function does not return class NoReturn: pass + + +def trait(cls): + return cls