mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-120417: Add #noqa to used imports in the stdlib (#120421)
Tools such as ruff can ignore "imported but unused" warnings if a line ends with "# noqa: F401". It avoids the temptation to remove an import which is used effectively.
This commit is contained in:
parent
ca5108a46d
commit
6ae254aaa0
25 changed files with 40 additions and 36 deletions
|
@ -355,7 +355,7 @@ def interact(banner=None, readfunc=None, local=None, exitmsg=None, local_exit=Fa
|
|||
console.raw_input = readfunc
|
||||
else:
|
||||
try:
|
||||
import readline
|
||||
import readline # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
console.interact(banner, exitmsg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue