0
0
mirror of https://github.com/python/cpython.git synced 2024-11-21 21:09:37 +01:00

gh-120417: Remove unused imports in the stdlib (#120420)

This commit is contained in:
Victor Stinner 2024-06-12 20:56:42 +02:00 committed by GitHub
parent 4b5d3e0e72
commit 4c6d4f5cb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 5 additions and 14 deletions

View File

@ -27,7 +27,7 @@ from .reader import Reader
if False:
from .types import Callback, SimpleContextManager, KeySpec, CommandName
from .types import SimpleContextManager, KeySpec, CommandName
isearch_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple(

View File

@ -8,7 +8,7 @@ import sys
# types
if False:
from typing import Protocol, Any
from typing import Protocol
class Pager(Protocol):
def __call__(self, text: str, title: str = "") -> None:
...

View File

@ -27,7 +27,6 @@ import re
import select
import signal
import struct
import sys
import termios
import time
from fcntl import ioctl

View File

@ -20,15 +20,12 @@
from __future__ import annotations
import io
from multiprocessing import Value
import os
import sys
import time
import msvcrt
from abc import ABC, abstractmethod
from collections import deque
from dataclasses import dataclass, field
import ctypes
from ctypes.wintypes import (
_COORD,

View File

@ -7,7 +7,6 @@ import keyword
import itertools
import abc
from reprlib import recursive_repr
from types import FunctionType, GenericAlias
__all__ = ['dataclass',
@ -333,7 +332,7 @@ class Field:
# it.
func(self.default, owner, name)
__class_getitem__ = classmethod(GenericAlias)
__class_getitem__ = classmethod(types.GenericAlias)
class _DataclassParams:

View File

@ -1,6 +1,5 @@
import os
import sqlite3
import sys
from pathlib import Path
from contextlib import suppress, closing
from collections.abc import MutableMapping

View File

@ -190,7 +190,7 @@ class GrepDialog(SearchDialogBase):
def _grep_dialog(parent): # htest #
from tkinter import Toplevel, Text, SEL, END
from tkinter import Toplevel, Text, SEL
from tkinter.ttk import Frame, Button
from idlelib.pyshell import PyShellFileList

View File

@ -13,7 +13,6 @@ except ImportError:
_frozen_importlib_external = _bootstrap_external
from ._abc import Loader
import abc
import warnings
__all__ = [

View File

@ -19,7 +19,6 @@ devnull = 'nul'
import os
import sys
import stat
import genericpath
from genericpath import *

View File

@ -75,7 +75,7 @@ from collections import deque
from reprlib import Repr
from traceback import format_exception_only
from _pyrepl.pager import (get_pager, plain, escape_less, pipe_pager,
from _pyrepl.pager import (get_pager, plain, pipe_pager,
plain_pager, tempfile_pager, tty_pager)

View File

@ -2,7 +2,6 @@
Suggested usage: from stat import *
"""
import sys
# Indices for stat struct members in the tuple returned by os.stat()