summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/_pyrepl/historical_reader.py2
-rw-r--r--Lib/_pyrepl/pager.py2
-rw-r--r--Lib/_pyrepl/unix_console.py1
-rw-r--r--Lib/_pyrepl/windows_console.py3
-rw-r--r--Lib/dataclasses.py3
-rw-r--r--Lib/dbm/sqlite3.py1
-rw-r--r--Lib/idlelib/grep.py2
-rw-r--r--Lib/importlib/abc.py1
-rw-r--r--Lib/ntpath.py1
-rw-r--r--Lib/pydoc.py2
-rw-r--r--Lib/stat.py1
11 files changed, 5 insertions, 14 deletions
diff --git a/Lib/_pyrepl/historical_reader.py b/Lib/_pyrepl/historical_reader.py
index 121de33..dd90912 100644
--- a/Lib/_pyrepl/historical_reader.py
+++ b/Lib/_pyrepl/historical_reader.py
@@ -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(
diff --git a/Lib/_pyrepl/pager.py b/Lib/_pyrepl/pager.py
index 1ac733e..66dcd99 100644
--- a/Lib/_pyrepl/pager.py
+++ b/Lib/_pyrepl/pager.py
@@ -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:
...
diff --git a/Lib/_pyrepl/unix_console.py b/Lib/_pyrepl/unix_console.py
index af92908..c4dedd9 100644
--- a/Lib/_pyrepl/unix_console.py
+++ b/Lib/_pyrepl/unix_console.py
@@ -27,7 +27,6 @@ import re
import select
import signal
import struct
-import sys
import termios
import time
from fcntl import ioctl
diff --git a/Lib/_pyrepl/windows_console.py b/Lib/_pyrepl/windows_console.py
index f691ca3..9e97b15 100644
--- a/Lib/_pyrepl/windows_console.py
+++ b/Lib/_pyrepl/windows_console.py
@@ -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,
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index aeafbfb..74011b7 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -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:
diff --git a/Lib/dbm/sqlite3.py b/Lib/dbm/sqlite3.py
index 74c9d9b..7e0ae2a2 100644
--- a/Lib/dbm/sqlite3.py
+++ b/Lib/dbm/sqlite3.py
@@ -1,6 +1,5 @@
import os
import sqlite3
-import sys
from pathlib import Path
from contextlib import suppress, closing
from collections.abc import MutableMapping
diff --git a/Lib/idlelib/grep.py b/Lib/idlelib/grep.py
index ef14349..42048ff 100644
--- a/Lib/idlelib/grep.py
+++ b/Lib/idlelib/grep.py
@@ -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
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index b6b2c79..eea6b38 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -13,7 +13,6 @@ except ImportError:
_frozen_importlib_external = _bootstrap_external
from ._abc import Loader
import abc
-import warnings
__all__ = [
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 83e2d3b..1b1873f 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -19,7 +19,6 @@ devnull = 'nul'
import os
import sys
-import stat
import genericpath
from genericpath import *
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index d7579c1..278e484 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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)
diff --git a/Lib/stat.py b/Lib/stat.py
index 9167ab1..1b4ed1e 100644
--- a/Lib/stat.py
+++ b/Lib/stat.py
@@ -2,7 +2,6 @@
Suggested usage: from stat import *
"""
-import sys
# Indices for stat struct members in the tuple returned by os.stat()