summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-22 17:14:27 (GMT)
committerGitHub <noreply@github.com>2022-06-22 17:14:27 (GMT)
commit47e35625ff2c4e6511a12e7178c3e4fbc965b634 (patch)
treee9a6b4d687233135f993260b12011613b9189058 /Tools
parent8661c5053fbe3e246289d77e49a813470b3a16f7 (diff)
downloadcpython-47e35625ff2c4e6511a12e7178c3e4fbc965b634.zip
cpython-47e35625ff2c4e6511a12e7178c3e4fbc965b634.tar.gz
cpython-47e35625ff2c4e6511a12e7178c3e4fbc965b634.tar.bz2
gh-84623: Remove unused imports (#94132)
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py1
-rw-r--r--Tools/peg_generator/pegen/grammar.py7
-rwxr-xr-xTools/peg_generator/scripts/grammar_grapher.py1
-rwxr-xr-xTools/peg_generator/scripts/test_parse_directory.py2
-rwxr-xr-xTools/peg_generator/scripts/test_pypi_packages.py3
-rw-r--r--Tools/scripts/freeze_modules.py1
-rwxr-xr-xTools/scripts/generate_re_casefix.py1
-rwxr-xr-xTools/scripts/pathfix.py1
-rwxr-xr-xTools/scripts/stable_abi.py1
-rw-r--r--Tools/scripts/summarize_stats.py1
-rwxr-xr-xTools/ssl/multissltests.py1
11 files changed, 1 insertions, 19 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 53e29df..f0f2d20 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -22,7 +22,6 @@ import re
import shlex
import string
import sys
-import tempfile
import textwrap
import traceback
import types
diff --git a/Tools/peg_generator/pegen/grammar.py b/Tools/peg_generator/pegen/grammar.py
index fa47b98..03d60d0 100644
--- a/Tools/peg_generator/pegen/grammar.py
+++ b/Tools/peg_generator/pegen/grammar.py
@@ -1,23 +1,16 @@
from __future__ import annotations
-from abc import abstractmethod
from typing import (
- TYPE_CHECKING,
AbstractSet,
Any,
- Dict,
Iterable,
Iterator,
List,
Optional,
- Set,
Tuple,
Union,
)
-if TYPE_CHECKING:
- from pegen.parser_generator import ParserGenerator
-
class GrammarError(Exception):
pass
diff --git a/Tools/peg_generator/scripts/grammar_grapher.py b/Tools/peg_generator/scripts/grammar_grapher.py
index 4a41dfa..e5271a0 100755
--- a/Tools/peg_generator/scripts/grammar_grapher.py
+++ b/Tools/peg_generator/scripts/grammar_grapher.py
@@ -30,7 +30,6 @@ from pegen.grammar import (
Alt,
Cut,
Forced,
- Grammar,
Group,
Leaf,
Lookahead,
diff --git a/Tools/peg_generator/scripts/test_parse_directory.py b/Tools/peg_generator/scripts/test_parse_directory.py
index a5e26f0..f5cf198 100755
--- a/Tools/peg_generator/scripts/test_parse_directory.py
+++ b/Tools/peg_generator/scripts/test_parse_directory.py
@@ -5,7 +5,6 @@ import ast
import os
import sys
import time
-import traceback
import tokenize
from glob import glob, escape
from pathlib import PurePath
@@ -13,7 +12,6 @@ from pathlib import PurePath
from typing import List, Optional, Any, Tuple
sys.path.insert(0, os.getcwd())
-from pegen.ast_dump import ast_dump
from pegen.testutil import print_memstats
SUCCESS = "\033[92m"
diff --git a/Tools/peg_generator/scripts/test_pypi_packages.py b/Tools/peg_generator/scripts/test_pypi_packages.py
index e2eaef9..01ccc3d 100755
--- a/Tools/peg_generator/scripts/test_pypi_packages.py
+++ b/Tools/peg_generator/scripts/test_pypi_packages.py
@@ -9,11 +9,10 @@ import shutil
import pathlib
import sys
-from typing import Generator, Any
+from typing import Generator
sys.path.insert(0, ".")
-from pegen import build
from scripts import test_parse_directory
HERE = pathlib.Path(__file__).resolve().parent
diff --git a/Tools/scripts/freeze_modules.py b/Tools/scripts/freeze_modules.py
index dd208c7..aa1e4fe 100644
--- a/Tools/scripts/freeze_modules.py
+++ b/Tools/scripts/freeze_modules.py
@@ -8,7 +8,6 @@ import hashlib
import os
import ntpath
import posixpath
-import sys
import argparse
from update_file import updating_file_with_tmpfile
diff --git a/Tools/scripts/generate_re_casefix.py b/Tools/scripts/generate_re_casefix.py
index 00b048b..625b065 100755
--- a/Tools/scripts/generate_re_casefix.py
+++ b/Tools/scripts/generate_re_casefix.py
@@ -2,7 +2,6 @@
# This script generates Lib/re/_casefix.py.
import collections
-import re
import sys
import unicodedata
diff --git a/Tools/scripts/pathfix.py b/Tools/scripts/pathfix.py
index d252321..f957b11 100755
--- a/Tools/scripts/pathfix.py
+++ b/Tools/scripts/pathfix.py
@@ -27,7 +27,6 @@
# into a program for a different change to Python programs...
import sys
-import re
import os
from stat import *
import getopt
diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py
index f5a9f8d..d557e10 100755
--- a/Tools/scripts/stable_abi.py
+++ b/Tools/scripts/stable_abi.py
@@ -16,7 +16,6 @@ import argparse
import textwrap
import tomllib
import difflib
-import shutil
import pprint
import sys
import os
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index 93a9b6b..26e9c4e 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -7,7 +7,6 @@ import os.path
import opcode
from datetime import date
import itertools
-import argparse
import sys
if os.name == "nt":
diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py
index 8207680..fc6b2d0 100755
--- a/Tools/ssl/multissltests.py
+++ b/Tools/ssl/multissltests.py
@@ -35,7 +35,6 @@ except ImportError:
from urllib2 import urlopen, HTTPError
import re
import shutil
-import string
import subprocess
import sys
import tarfile