mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 21:17:54 +00:00
Remove unnecessary imports.
This commit is contained in:
parent
b2541be7c6
commit
3fb0bcfff7
@ -6,7 +6,6 @@ Ported to Python 3.
|
||||
|
||||
from future.utils import PY2
|
||||
|
||||
from warnings import catch_warnings
|
||||
|
||||
|
||||
def patch():
|
||||
|
@ -6,7 +6,7 @@ Ported to Python 3.
|
||||
Note that for RemoteInterfaces, the __remote_name__ needs to be a native string because of https://github.com/warner/foolscap/blob/43f4485a42c9c28e2c79d655b3a9e24d4e6360ca/src/foolscap/remoteinterface.py#L67
|
||||
"""
|
||||
|
||||
from future.utils import PY2, native_str
|
||||
from future.utils import native_str
|
||||
|
||||
from past.builtins import long
|
||||
from typing import Dict
|
||||
|
@ -3,7 +3,7 @@ Ported to Python 3.
|
||||
"""
|
||||
|
||||
|
||||
from future.utils import PY2, native_str
|
||||
from future.utils import native_str
|
||||
|
||||
from zope.interface import Interface
|
||||
from foolscap.api import StringConstraint, SetOf, DictOf, Any, \
|
||||
|
@ -1,6 +1,5 @@
|
||||
import os, sys
|
||||
from io import StringIO
|
||||
from past.builtins import unicode
|
||||
import six
|
||||
|
||||
from twisted.python import usage
|
||||
@ -106,7 +105,7 @@ def parse_options(argv, config=None):
|
||||
config = Options()
|
||||
try:
|
||||
config.parseOptions(argv)
|
||||
except usage.error as e:
|
||||
except usage.error:
|
||||
raise
|
||||
return config
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, PY3
|
||||
from future.utils import PY3
|
||||
|
||||
from six import ensure_str
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, PY3
|
||||
from future.utils import PY3
|
||||
|
||||
from urllib.parse import quote as url_quote
|
||||
from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, escape_path, \
|
||||
|
@ -2,7 +2,7 @@
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, PY3
|
||||
from future.utils import PY3
|
||||
|
||||
from six import ensure_str
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, PY3
|
||||
from future.utils import PY3
|
||||
|
||||
import os.path
|
||||
from allmydata.util import base32
|
||||
|
@ -3,7 +3,7 @@ Ported to Python 3.
|
||||
"""
|
||||
|
||||
|
||||
from future.utils import PY2, bytes_to_native_str
|
||||
from future.utils import bytes_to_native_str
|
||||
|
||||
import os, stat, struct, time
|
||||
|
||||
|
@ -14,7 +14,7 @@ from twisted.python.monkey import MonkeyPatcher
|
||||
|
||||
from allmydata.util import fileutil
|
||||
from allmydata.util.fileutil import abspath_expanduser_unicode
|
||||
from allmydata.util.encodingutil import get_io_encoding, unicode_to_argv
|
||||
from allmydata.util.encodingutil import unicode_to_argv
|
||||
from allmydata.util.namespace import Namespace
|
||||
from allmydata.scripts import cli, backupdb
|
||||
from ..common_util import StallMixin
|
||||
|
@ -9,8 +9,7 @@ from twisted.internet import defer
|
||||
|
||||
from allmydata.scripts import cli
|
||||
from allmydata.util import fileutil
|
||||
from allmydata.util.encodingutil import (quote_output, get_io_encoding,
|
||||
unicode_to_output, to_bytes)
|
||||
from allmydata.util.encodingutil import (quote_output, unicode_to_output, to_bytes)
|
||||
from allmydata.util.assertutil import _assert
|
||||
from ..no_network import GridTestMixin
|
||||
from .common import CLITestMixin
|
||||
|
@ -2,7 +2,7 @@
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, PY3
|
||||
from future.utils import PY3
|
||||
from six import ensure_str
|
||||
|
||||
from twisted.trial import unittest
|
||||
|
@ -2,7 +2,7 @@
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, bchr
|
||||
from future.utils import bchr
|
||||
|
||||
from past.builtins import long
|
||||
|
||||
|
@ -5,7 +5,7 @@ Ported to Python 3.
|
||||
"""
|
||||
|
||||
|
||||
from future.utils import PY2, PY3
|
||||
from future.utils import PY3
|
||||
|
||||
import time
|
||||
import os.path
|
||||
|
@ -5,7 +5,7 @@ Ported to Python 3.
|
||||
"""
|
||||
|
||||
|
||||
from future.utils import PY2, native_str
|
||||
from future.utils import native_str
|
||||
|
||||
from twisted.trial import unittest
|
||||
from twisted.python.failure import Failure
|
||||
|
@ -46,9 +46,6 @@ from allmydata.util.pid import (
|
||||
)
|
||||
from allmydata.test import common_util
|
||||
import allmydata
|
||||
from allmydata.scripts.runner import (
|
||||
parse_options,
|
||||
)
|
||||
from allmydata.scripts.tahoe_run import (
|
||||
on_stdin_close,
|
||||
)
|
||||
|
@ -8,7 +8,7 @@ Once Python 2 support is dropped, most of this module will obsolete, since
|
||||
Unicode is the default everywhere in Python 3.
|
||||
"""
|
||||
|
||||
from future.utils import PY2, PY3, native_str
|
||||
from future.utils import PY3, native_str
|
||||
from future.builtins import str as future_str
|
||||
|
||||
from past.builtins import unicode
|
||||
|
@ -5,7 +5,6 @@ Ported to Python 3.
|
||||
"""
|
||||
|
||||
import json
|
||||
import codecs
|
||||
|
||||
|
||||
def bytes_to_unicode(any_bytes, obj):
|
||||
|
Loading…
Reference in New Issue
Block a user