Python mypy_extensions.TypedDict() Examples
The following are 3
code examples of mypy_extensions.TypedDict().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
mypy_extensions
, or try the search function
.
Example #1
Source File: test_typing_inspect.py From typing_inspect with MIT License | 5 votes |
def test_typed_dict(self): TDOld = TypedDict("TDOld", {'x': int, 'y': int}) self.assertEqual(typed_dict_keys(TD), {'x': int, 'y': int}) self.assertEqual(typed_dict_keys(TDOld), {'x': int, 'y': int}) self.assertIs(typed_dict_keys(dict), None) self.assertIs(typed_dict_keys(Other), None) self.assertIsNot(typed_dict_keys(TD), TD.__annotations__)
Example #2
Source File: github_utils.py From ghstack with MIT License | 5 votes |
def TypedDict(name, attrs, total=True): # type: ignore return Dict[Any, Any]
Example #3
Source File: typed_dict.py From ghstack with MIT License | 5 votes |
def TypedDict(name, attrs, total=True): # type: ignore return Dict[Any, Any]