Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/concurrent/futures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@


def __dir__():
return __all__ + ('__author__', '__doc__')
return __all__ + ['__author__', '__doc__']


def __getattr__(name):
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test___all__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def check_all(self, modname):
raise FailedImport(modname)
if not hasattr(sys.modules[modname], "__all__"):
raise NoAll(modname)

names = {}
with self.subTest(module=modname):
with warnings_helper.check_warnings(
Expand All @@ -72,6 +73,9 @@ def check_all(self, modname):
all_set = set(all_list)
self.assertCountEqual(all_set, all_list, "in module {}".format(modname))
self.assertEqual(keys, all_set, "in module {}".format(modname))
# Verify __dir__ is non-empty and doesn't produce an error
self.assertTrue(dir(sys.modules[modname]))


def walk_modules(self, basedir, modpath):
for fn in sorted(os.listdir(basedir)):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed tab completion / ``dir()`` on ``concurrent.futures``.
Loading