File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -1222,8 +1222,8 @@ def refcount_test(test):
12221222
12231223def requires_limited_api (test ):
12241224 try :
1225- import _testcapi
1226- import _testlimitedcapi
1225+ import _testcapi # noqa: F401
1226+ import _testlimitedcapi # noqa: F401
12271227 except ImportError :
12281228 return unittest .skip ('needs _testcapi and _testlimitedcapi modules' )(test )
12291229 return test
@@ -2300,7 +2300,7 @@ def clear_ignored_deprecations(*tokens: object) -> None:
23002300def requires_venv_with_pip ():
23012301 # ensurepip requires zlib to open ZIP archives (.whl binary wheel packages)
23022302 try :
2303- import zlib
2303+ import zlib # noqa: F401
23042304 except ImportError :
23052305 return unittest .skipIf (True , "venv: ensurepip requires zlib" )
23062306
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ def test_all(self):
104104 # In case _socket fails to build, make this test fail more gracefully
105105 # than an AttributeError somewhere deep in concurrent.futures, email
106106 # or unittest.
107- import _socket
107+ import _socket # noqa: F401
108108
109109 ignored = []
110110 failed_imports = []
Original file line number Diff line number Diff line change @@ -1287,7 +1287,7 @@ def test_getfullargspec_builtin_func_no_signature(self):
12871287 (dict .__class_getitem__ , meth_type_o ),
12881288 ]
12891289 try :
1290- import _stat
1290+ import _stat # noqa: F401
12911291 except ImportError :
12921292 # if the _stat extension is not available, stat.S_IMODE() is
12931293 # implemented in Python, not in C
@@ -3188,7 +3188,7 @@ def test_signature_on_builtins_no_signature(self):
31883188 (dict .__class_getitem__ , meth_o ),
31893189 ]
31903190 try :
3191- import _stat
3191+ import _stat # noqa: F401
31923192 except ImportError :
31933193 # if the _stat extension is not available, stat.S_IMODE() is
31943194 # implemented in Python, not in C
Original file line number Diff line number Diff line change 1414
1515# some platforms lack working multiprocessing
1616try :
17- import _multiprocessing
17+ import _multiprocessing # noqa: F401
1818except ImportError :
1919 multiprocessing = None
2020else :
@@ -1229,7 +1229,7 @@ def test_pickling(self):
12291229 newpat = pickle .loads (pickled )
12301230 self .assertEqual (newpat , oldpat )
12311231 # current pickle expects the _compile() reconstructor in re module
1232- from re import _compile
1232+ from re import _compile # noqa: F401
12331233
12341234 def test_copying (self ):
12351235 import copy
Original file line number Diff line number Diff line change @@ -1747,7 +1747,7 @@ def test_other_bug(self):
17471747 @support .cpython_only
17481748 def test_uncollectable (self ):
17491749 try :
1750- import _testcapi
1750+ import _testcapi # noqa: F401
17511751 except ImportError :
17521752 raise unittest .SkipTest ("requires _testcapi" )
17531753 code = textwrap .dedent (r"""
@@ -2133,7 +2133,7 @@ def test_unload_tests(self):
21332133 def check_add_python_opts (self , option ):
21342134 # --fast-ci and --slow-ci add "-u -W default -bb -E" options to Python
21352135 try :
2136- import _testinternalcapi
2136+ import _testinternalcapi # noqa: F401
21372137 except ImportError :
21382138 raise unittest .SkipTest ("requires _testinternalcapi" )
21392139 code = textwrap .dedent (r"""
@@ -2199,7 +2199,7 @@ def test_add_python_opts(self):
21992199 'raising SIGSEGV on Android is unreliable' )
22002200 def test_worker_output_on_failure (self ):
22012201 try :
2202- from faulthandler import _sigsegv
2202+ from faulthandler import _sigsegv # noqa: F401
22032203 except ImportError :
22042204 self .skipTest ("need faulthandler._sigsegv" )
22052205
You can’t perform that action at this time.
0 commit comments