https://github.com/python/cpython/commit/0fadd9fd205e4df105676359876a6d6684f215a3
commit: 0fadd9fd205e4df105676359876a6d6684f215a3
branch: main
author: Stan Ulbrych <[email protected]>
committer: nascheme <[email protected]>
date: 2025-06-25T20:01:25-07:00
summary:
gh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)
files:
M Lib/pydoc.py
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 7528178fdcae97..d508fb70ea429e 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1812,7 +1812,6 @@ def writedocs(dir, pkgpath='', done=None):
def _introdoc():
- import textwrap
ver = '%d.%d' % sys.version_info[:2]
if os.environ.get('PYTHON_BASIC_REPL'):
pyrepl_keys = ''
@@ -2170,7 +2169,6 @@ def showtopic(self, topic, more_xrefs=''):
if more_xrefs:
xrefs = (xrefs or '') + ' ' + more_xrefs
if xrefs:
- import textwrap
text = 'Related help topics: ' + ', '.join(xrefs.split()) + '\n'
wrapped_text = textwrap.wrap(text, 72)
doc += '\n%s\n' % '\n'.join(wrapped_text)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]