Mercurial > hg > mercurial-source
changeset 10905:13a1b2fb7ef2
pylint, pyflakes: remove unused or duplicate imports
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Wed, 14 Apr 2010 17:58:10 +0900 |
parents | cd21bf199d17 |
children | 6ced27d3168a |
files | contrib/check-code.py doc/rst2man.py hgext/churn.py mercurial/byterange.py mercurial/hgweb/hgweb_mod.py mercurial/hgweb/server.py mercurial/patch.py mercurial/streamclone.py setup.py tests/get-with-headers.py tests/killdaemons.py tests/run-tests.py tests/test-status-inprocess.py |
diffstat | 13 files changed, 8 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -7,7 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import sys, re, glob +import re, glob import optparse def repquote(m):
--- a/doc/rst2man.py +++ b/doc/rst2man.py @@ -45,14 +45,9 @@ __docformat__ = 'reStructuredText' -import sys -import os -import time import re -from types import ListType -import docutils -from docutils import nodes, utils, writers, languages +from docutils import nodes, writers, languages import roman FIELD_LIST_INDENT = 7
--- a/hgext/churn.py +++ b/hgext/churn.py @@ -10,7 +10,7 @@ from mercurial.i18n import _ from mercurial import patch, cmdutil, util, templater -import sys, os +import os import time, datetime def maketemplater(ui, repo, tmpl):
--- a/mercurial/byterange.py +++ b/mercurial/byterange.py @@ -25,11 +25,6 @@ import urllib2 import email.Utils -try: - from cStringIO import StringIO -except ImportError, msg: - from StringIO import StringIO - class RangeError(IOError): """Error raised when an unsatisfiable range is requested.""" pass
--- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -10,7 +10,6 @@ from mercurial import ui, hg, hook, error, encoding, templater from common import get_mtime, ErrorResponse, permhooks from common import HTTP_OK, HTTP_BAD_REQUEST, HTTP_NOT_FOUND, HTTP_SERVER_ERROR -from common import HTTP_UNAUTHORIZED, HTTP_METHOD_NOT_ALLOWED from request import wsgirequest import webcommands, protocol, webutil
--- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -7,7 +7,7 @@ # GNU General Public License version 2 or any later version. import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback -from mercurial import hg, util, error +from mercurial import util, error from mercurial.i18n import _ def _splitURI(uri):
--- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -10,7 +10,7 @@ from node import hex, nullid, short import base85, cmdutil, mdiff, util, diffhelpers, copies import cStringIO, email.Parser, os, re -import sys, tempfile, zlib +import tempfile, zlib gitre = re.compile('diff --git a/(.*) b/(.*)')
--- a/mercurial/streamclone.py +++ b/mercurial/streamclone.py @@ -6,7 +6,6 @@ # GNU General Public License version 2 or any later version. import util, error -from i18n import _ from mercurial import store
--- a/setup.py +++ b/setup.py @@ -37,7 +37,6 @@ import tempfile from distutils.core import setup, Extension from distutils.dist import Distribution -from distutils.command.install_data import install_data from distutils.command.build import build from distutils.command.build_py import build_py from distutils.spawn import spawn, find_executable
--- a/tests/get-with-headers.py +++ b/tests/get-with-headers.py @@ -3,7 +3,7 @@ """This does HTTP GET requests given a host:port and path and returns a subset of the headers plus the body of the result.""" -import httplib, sys, re +import httplib, sys try: import msvcrt, os
--- a/tests/killdaemons.py +++ b/tests/killdaemons.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import os, sys, time, errno, signal +import os, time, errno, signal # Kill off any leftover daemon processes try: