Issue #23277: Remove more unused sys and os imports.
This commit is contained in:
parent
18a8affc8e
commit
c7f44aa99a
|
@ -1,5 +1,4 @@
|
||||||
"""Tests for distutils.command.clean."""
|
"""Tests for distutils.command.clean."""
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import getpass
|
import getpass
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""Tests for distutils.pypirc.pypirc."""
|
"""Tests for distutils.pypirc.pypirc."""
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""Tests for distutils.command.install_data."""
|
"""Tests for distutils.command.install_data."""
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import getpass
|
import getpass
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""Tests for distutils.command.install_headers."""
|
"""Tests for distutils.command.install_headers."""
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import getpass
|
import getpass
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""Tests for distutils.unixccompiler."""
|
"""Tests for distutils.unixccompiler."""
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import EnvironmentVarGuard, run_unittest
|
from test.support import EnvironmentVarGuard, run_unittest
|
||||||
|
|
|
@ -15,7 +15,6 @@ from test.support import verbose
|
||||||
|
|
||||||
# Python imports
|
# Python imports
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import warnings
|
import warnings
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
|
@ -11,7 +11,6 @@ especially when debugging a test.
|
||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
import sys
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
# Testing imports
|
# Testing imports
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
# Testing imports
|
# Testing imports
|
||||||
from . import support
|
from . import support
|
||||||
|
|
||||||
# Python imports
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
# Local imports
|
# Local imports
|
||||||
from lib2to3.pytree import Node, Leaf
|
from lib2to3.pytree import Node, Leaf
|
||||||
from lib2to3 import fixer_util
|
from lib2to3 import fixer_util
|
||||||
|
|
|
@ -318,7 +318,6 @@ class CommonTest(unittest.TestCase):
|
||||||
self.assertEqual(id(s), id(s*1))
|
self.assertEqual(id(s), id(s*1))
|
||||||
|
|
||||||
def test_bigrepeat(self):
|
def test_bigrepeat(self):
|
||||||
import sys
|
|
||||||
if sys.maxsize <= 2147483647:
|
if sys.maxsize <= 2147483647:
|
||||||
x = self.type2test([0])
|
x = self.type2test([0])
|
||||||
x *= 2**16
|
x *= 2**16
|
||||||
|
|
|
@ -5,7 +5,6 @@ machinery = util.import_importlib('importlib.machinery')
|
||||||
import codecs
|
import codecs
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
import types
|
import types
|
||||||
# Because sys.path gets essentially blanked, need to have unicodedata already
|
# Because sys.path gets essentially blanked, need to have unicodedata already
|
||||||
# imported for the parser to use.
|
# imported for the parser to use.
|
||||||
|
|
|
@ -4,7 +4,6 @@ from itertools import *
|
||||||
import weakref
|
import weakref
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
import sys
|
|
||||||
import operator
|
import operator
|
||||||
import random
|
import random
|
||||||
import copy
|
import copy
|
||||||
|
|
|
@ -6,7 +6,6 @@ import operator
|
||||||
import copy
|
import copy
|
||||||
import pickle
|
import pickle
|
||||||
from random import randrange, shuffle
|
from random import randrange, shuffle
|
||||||
import sys
|
|
||||||
import warnings
|
import warnings
|
||||||
import collections
|
import collections
|
||||||
import collections.abc
|
import collections.abc
|
||||||
|
|
|
@ -9,7 +9,6 @@ import xmlrpc.server
|
||||||
import http.client
|
import http.client
|
||||||
import http, http.server
|
import http, http.server
|
||||||
import socket
|
import socket
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import io
|
import io
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
Loading…
Reference in New Issue