]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106200: Remove unused imports (#106201)
authorNikita Sobolev <mail@sobolevn.me>
Wed, 28 Jun 2023 11:55:41 +0000 (14:55 +0300)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 11:55:41 +0000 (11:55 +0000)
Lib/poplib.py
Lib/test/test_capi/test_misc.py
Lib/test/test_tokenize.py
Tools/cases_generator/lexer.py

index 9a5ef03c9831032be359cf9baea0a850e5b434ac..1a1629d175b6d9dab0233253059c4ece2193f94b 100644 (file)
@@ -451,7 +451,6 @@ if HAVE_SSL:
     __all__.append("POP3_SSL")
 
 if __name__ == "__main__":
-    import sys
     a = POP3(sys.argv[1])
     print(a.getwelcome())
     a.user(sys.argv[2])
index 5ee712323d219a280e1917f52432b0547b991b58..9e825a343eb318a108e013f7d9714472a5230eee 100644 (file)
@@ -1823,7 +1823,6 @@ class SubinterpreterTest(unittest.TestCase):
         1-to-1 with the new interpreter's settings.  This test verifies
         that they match.
         """
-        import json
 
         OBMALLOC = 1<<5
         EXTENSIONS = 1<<8
@@ -1902,7 +1901,6 @@ class SubinterpreterTest(unittest.TestCase):
         This verifies that the override works but does not modify
         the underlying setting.
         """
-        import json
 
         OBMALLOC = 1<<5
         EXTENSIONS = 1<<8
index 97c4884f6e33b8d1e0b88b586cf32dd389bee5c7..d1552d8a20808f671d7e964f6a6e446c3436ed59 100644 (file)
@@ -6,7 +6,6 @@ from io import BytesIO, StringIO
 from textwrap import dedent
 from unittest import TestCase, mock
 from test import support
-from test.support import os_helper
 from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
                                INVALID_UNDERSCORE_LITERALS)
 from test.support import os_helper
index aa8f1bccf5d9682de0a685894ab93a68727c6e26..fe9c05ede5aa475888724504513f4a68cd4a6a76 100644 (file)
@@ -3,7 +3,6 @@
 # https://gist.github.com/markshannon/db7ab649440b5af765451bb77c7dba34
 
 import re
-import sys
 from dataclasses import dataclass
 
 def choice(*opts):