From c4191ac15aa54c8269ccf2e6292b4a9cc928359e Mon Sep 17 00:00:00 2001 From: Bas van Beek <43369155+BvB93@users.noreply.github.com> Date: Tue, 4 May 2021 22:12:45 +0200 Subject: [PATCH] Add a missing comma to `__all__` (#808) * BUG: Added a missing comma in `__all__` * TST: Add a test to ensure that all objects in `__all__` are present in the module --- typing_extensions/src_py3/test_typing_extensions.py | 4 ++++ typing_extensions/src_py3/typing_extensions.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/typing_extensions/src_py3/test_typing_extensions.py b/typing_extensions/src_py3/test_typing_extensions.py index e2889ce0..3f3c2f9e 100644 --- a/typing_extensions/src_py3/test_typing_extensions.py +++ b/typing_extensions/src_py3/test_typing_extensions.py @@ -2191,6 +2191,10 @@ def test_typing_extensions_includes_standard(self): self.assertIn('Protocol', a) self.assertIn('runtime', a) + # Check that all objects in `__all__` are present in the module + for name in a: + self.assertTrue(hasattr(typing_extensions, name)) + def test_typing_extensions_defers_when_possible(self): exclude = { 'overload', diff --git a/typing_extensions/src_py3/typing_extensions.py b/typing_extensions/src_py3/typing_extensions.py index 82d1c2dc..433b15fe 100644 --- a/typing_extensions/src_py3/typing_extensions.py +++ b/typing_extensions/src_py3/typing_extensions.py @@ -136,7 +136,7 @@ def _check_methods_in_mro(C, *methods): 'Counter', 'Deque', 'DefaultDict', - 'OrderedDict' + 'OrderedDict', 'TypedDict', # Structural checks, a.k.a. protocols.