mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -75,9 +75,12 @@ from collections import deque
|
|||
from reprlib import Repr
|
||||
from traceback import format_exception_only
|
||||
|
||||
from _pyrepl.pager import (get_pager, plain, pipe_pager,
|
||||
from _pyrepl.pager import (get_pager, pipe_pager,
|
||||
plain_pager, tempfile_pager, tty_pager)
|
||||
|
||||
# Expose plain() as pydoc.plain()
|
||||
from _pyrepl.pager import plain # noqa: F401
|
||||
|
||||
|
||||
# --------------------------------------------------------- old names
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue