From d830c4a944bcdcc8fe729a60f438fc762965eec1 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 28 Jun 2023 14:55:41 +0300 Subject: gh-106200: Remove unused imports (#106201) --- Lib/poplib.py | 1 - Lib/test/test_capi/test_misc.py | 2 -- Lib/test/test_tokenize.py | 1 - Tools/cases_generator/lexer.py | 1 - 4 files changed, 5 deletions(-) diff --git a/Lib/poplib.py b/Lib/poplib.py index 9a5ef03..1a1629d 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -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]) diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index 5ee7123..9e825a3 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -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 diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py index 97c4884..d1552d8 100644 --- a/Lib/test/test_tokenize.py +++ b/Lib/test/test_tokenize.py @@ -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 diff --git a/Tools/cases_generator/lexer.py b/Tools/cases_generator/lexer.py index aa8f1bc..fe9c05e 100644 --- a/Tools/cases_generator/lexer.py +++ b/Tools/cases_generator/lexer.py @@ -3,7 +3,6 @@ # https://gist.github.com/markshannon/db7ab649440b5af765451bb77c7dba34 import re -import sys from dataclasses import dataclass def choice(*opts): -- cgit v0.12