mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself (GH-32180)
This commit is contained in:
parent
a5ba445322
commit
63f32fae79
2 changed files with 18 additions and 1 deletions
|
@ -292,7 +292,7 @@ def visiblename(name, all=None, obj=None):
|
|||
if name.startswith('_') and hasattr(obj, '_fields'):
|
||||
return True
|
||||
# Ignore __future__ imports.
|
||||
if name in _future_feature_names:
|
||||
if obj is not __future__ and name in _future_feature_names:
|
||||
if isinstance(getattr(obj, name, None), __future__._Feature):
|
||||
return False
|
||||
if all is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue