Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-134357: Remove unused imports in tests#134340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1101,7 +1101,6 @@ def __init__(self): | ||
self.started = False | ||
def start(self): | ||
try: | ||
f = open(self.procfile, 'r') | ||
except OSError as e: | ||
@@ -2728,7 +2727,7 @@ def iter_builtin_types(): | ||
# Fall back to making a best-effort guess. | ||
if hasattr(object, '__flags__'): | ||
# Look for any type object with the Py_TPFLAGS_STATIC_BUILTIN flag set. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This import has to stay. It deserves a @encukou: Can you confirm? | ||
import datetime # noqa: F401 | ||
seen = set() | ||
for cls, subs in walk_class_hierarchy(object): | ||
if cls in seen: | ||
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -6,8 +6,8 @@ | ||||||||||||||
# aliases: | ||||||||||||||
from _interpchannels import ( | ||||||||||||||
hugovk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||||||||||||||
ChannelError, ChannelNotFoundError, ChannelClosedError, # noqa: F401 | ||||||||||||||
ChannelEmptyError, ChannelNotEmptyError, # noqa: F401 | ||||||||||||||
Comment on lines +9 to +10 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. In this specific case maybe better to add a per-file ignore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Or would you prefer the two unused imports on the same line? That way we still check the rest of the file. Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I'm fine with the current PR: two lines with | ||||||||||||||
) | ||||||||||||||
from ._crossinterp import ( | ||||||||||||||
UNBOUND_ERROR, UNBOUND_REMOVE, | ||||||||||||||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -3,7 +3,6 @@ | ||
""" | ||
import os | ||
import sys | ||
import types | ||
import unittest | ||
from test import support | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2,7 +2,6 @@ | ||
import codecs | ||
import html.entities | ||
import itertools | ||
import sys | ||
import unicodedata | ||
import unittest | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import contextlib | ||
import itertools | ||
import sys | ||
import types | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import binascii | ||
import math | ||
import struct | ||
import sys | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -28,7 +28,6 @@ | ||
import math | ||
import os, sys | ||
import operator | ||
import pickle, copy | ||
import unittest | ||
import numbers | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -12,7 +12,6 @@ | ||
import threading | ||
import types | ||
import unittest | ||
from test import support | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from string.templatelib import Interpolation | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
"""Module docstring""" | ||
# Test docstring extraction | ||
from gettext import gettext as _ # noqa: F401 | ||
# Empty docstring | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import unittest | ||
from . import load_tests | ||
if __name__ == "__main__": | ||
Uh oh!
There was an error while loading.Please reload this page.