Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4c6d4f5

Browse filesBrowse files
authored
gh-120417: Remove unused imports in the stdlib (#120420)
1 parent 4b5d3e0 commit 4c6d4f5
Copy full SHA for 4c6d4f5

File tree

Expand file treeCollapse file tree

11 files changed

+5
-14
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+5
-14
lines changed

‎Lib/_pyrepl/historical_reader.py

Copy file name to clipboardExpand all lines: Lib/_pyrepl/historical_reader.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
if False:
30-
from .types import Callback, SimpleContextManager, KeySpec, CommandName
30+
from .types import SimpleContextManager, KeySpec, CommandName
3131

3232

3333
isearch_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple(

‎Lib/_pyrepl/pager.py

Copy file name to clipboardExpand all lines: Lib/_pyrepl/pager.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# types
1010
if False:
11-
from typing import Protocol, Any
11+
from typing import Protocol
1212
class Pager(Protocol):
1313
def __call__(self, text: str, title: str = "") -> None:
1414
...

‎Lib/_pyrepl/unix_console.py

Copy file name to clipboardExpand all lines: Lib/_pyrepl/unix_console.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import select
2828
import signal
2929
import struct
30-
import sys
3130
import termios
3231
import time
3332
from fcntl import ioctl

‎Lib/_pyrepl/windows_console.py

Copy file name to clipboardExpand all lines: Lib/_pyrepl/windows_console.py
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@
2020
from __future__ import annotations
2121

2222
import io
23-
from multiprocessing import Value
2423
import os
2524
import sys
2625
import time
2726
import msvcrt
2827

29-
from abc import ABC, abstractmethod
3028
from collections import deque
31-
from dataclasses import dataclass, field
3229
import ctypes
3330
from ctypes.wintypes import (
3431
_COORD,

‎Lib/dataclasses.py

Copy file name to clipboardExpand all lines: Lib/dataclasses.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import itertools
88
import abc
99
from reprlib import recursive_repr
10-
from types import FunctionType, GenericAlias
1110

1211

1312
__all__ = ['dataclass',
@@ -333,7 +332,7 @@ def __set_name__(self, owner, name):
333332
# it.
334333
func(self.default, owner, name)
335334

336-
__class_getitem__ = classmethod(GenericAlias)
335+
__class_getitem__ = classmethod(types.GenericAlias)
337336

338337

339338
class _DataclassParams:

‎Lib/dbm/sqlite3.py

Copy file name to clipboardExpand all lines: Lib/dbm/sqlite3.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import sqlite3
3-
import sys
43
from pathlib import Path
54
from contextlib import suppress, closing
65
from collections.abc import MutableMapping

‎Lib/idlelib/grep.py

Copy file name to clipboardExpand all lines: Lib/idlelib/grep.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def grep_it(self, prog, path):
190190

191191

192192
def _grep_dialog(parent): # htest #
193-
from tkinter import Toplevel, Text, SEL, END
193+
from tkinter import Toplevel, Text, SEL
194194
from tkinter.ttk import Frame, Button
195195
from idlelib.pyshell import PyShellFileList
196196

‎Lib/importlib/abc.py

Copy file name to clipboardExpand all lines: Lib/importlib/abc.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
_frozen_importlib_external = _bootstrap_external
1414
from ._abc import Loader
1515
import abc
16-
import warnings
1716

1817

1918
__all__ = [

‎Lib/ntpath.py

Copy file name to clipboardExpand all lines: Lib/ntpath.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import os
2121
import sys
22-
import stat
2322
import genericpath
2423
from genericpath import *
2524

‎Lib/pydoc.py

Copy file name to clipboardExpand all lines: Lib/pydoc.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class or function within a module or module in a package. If the
7575
from reprlib import Repr
7676
from traceback import format_exception_only
7777

78-
from _pyrepl.pager import (get_pager, plain, escape_less, pipe_pager,
78+
from _pyrepl.pager import (get_pager, plain, pipe_pager,
7979
plain_pager, tempfile_pager, tty_pager)
8080

8181

‎Lib/stat.py

Copy file name to clipboardExpand all lines: Lib/stat.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
Suggested usage: from stat import *
44
"""
5-
import sys
65

76
# Indices for stat struct members in the tuple returned by os.stat()
87

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.