]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Thu, 26 Jun 2025 03:01:25 +0000 (04:01 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Jun 2025 03:01:25 +0000 (20:01 -0700)
Lib/pydoc.py

index 7528178fdcae97f3b5b9f38562ef47f765be2eff..d508fb70ea429ecb9381c2d47634354ac588675b 100644 (file)
@@ -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 @@ module "pydoc_data.topics" could not be found.
         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)