mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-120417: Add #noqa: F401 to tests (#120627)
Ignore linter "imported but unused" warnings in tests when the linter doesn't understand how the import is used.
This commit is contained in:
parent
7e189aed64
commit
e9f4d80fa6
24 changed files with 43 additions and 41 deletions
|
@ -441,8 +441,8 @@ class TestSpecifics(unittest.TestCase):
|
|||
def f():
|
||||
__mangled = 1
|
||||
__not_mangled__ = 2
|
||||
import __mangled_mod
|
||||
import __package__.module
|
||||
import __mangled_mod # noqa: F401
|
||||
import __package__.module # noqa: F401
|
||||
|
||||
self.assertIn("_A__mangled", A.f.__code__.co_varnames)
|
||||
self.assertIn("__not_mangled__", A.f.__code__.co_varnames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue