mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -3,9 +3,9 @@
|
|||
import _symtable
|
||||
from _symtable import (
|
||||
USE,
|
||||
DEF_GLOBAL, DEF_NONLOCAL, DEF_LOCAL,
|
||||
DEF_PARAM, DEF_TYPE_PARAM,
|
||||
DEF_FREE_CLASS,
|
||||
DEF_GLOBAL, # noqa: F401
|
||||
DEF_NONLOCAL, DEF_LOCAL,
|
||||
DEF_PARAM, DEF_TYPE_PARAM, DEF_FREE_CLASS,
|
||||
DEF_IMPORT, DEF_BOUND, DEF_ANNOT,
|
||||
DEF_COMP_ITER, DEF_COMP_CELL,
|
||||
SCOPE_OFF, SCOPE_MASK,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue