mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +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
|
|
@ -415,7 +415,7 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
from _operator import __doc__
|
||||
from _operator import __doc__ # noqa: F401
|
||||
|
||||
# All of these "__func__ = func" assignments have to happen after importing
|
||||
# from _operator to make sure they're set to the right function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue