mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
[3.14] gh-137282: Fix TypeError in tab completion and dir() of concurrent.futures (GH-137214) (#137284)
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
parent
f17d77f112
commit
9e8a9ac11a
@ -44,7 +44,7 @@ if _interpreters:
|
||||
|
||||
|
||||
def __dir__():
|
||||
return __all__ + ('__author__', '__doc__')
|
||||
return __all__ + ['__author__', '__doc__']
|
||||
|
||||
|
||||
def __getattr__(name):
|
||||
|
||||
@ -72,6 +72,8 @@ class AllTest(unittest.TestCase):
|
||||
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)):
|
||||
|
||||
@ -0,0 +1 @@
|
||||
Fix tab completion and :func:`dir` on :mod:`concurrent.futures`.
|
||||
Loading…
x
Reference in New Issue
Block a user