From fff0b73234c56ff1727bbc2acc91f780433413d7 Mon Sep 17 00:00:00 2001 From: IceArmy Date: Thu, 15 Sep 2011 17:18:08 -0700 Subject: [PATCH] Alphebetize imports --- python/pyphantomjs/config.py | 2 +- python/pyphantomjs/filesystem.py | 8 ++++---- python/pyphantomjs/networkaccessmanager.py | 2 +- python/pyphantomjs/phantom.py | 8 ++++---- python/pyphantomjs/plugincontroller.py | 2 +- python/pyphantomjs/pyphantomjs.py | 4 ++-- python/pyphantomjs/utils.py | 8 ++++---- python/pyphantomjs/webpage.py | 16 ++++++++-------- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/python/pyphantomjs/config.py b/python/pyphantomjs/config.py index ee30416b..f42ded57 100644 --- a/python/pyphantomjs/config.py +++ b/python/pyphantomjs/config.py @@ -17,8 +17,8 @@ along with this program. If not, see . ''' -import sys import codecs +import sys from PyQt4.QtCore import QObject, qWarning from PyQt4.QtWebKit import QWebPage diff --git a/python/pyphantomjs/filesystem.py b/python/pyphantomjs/filesystem.py index 0faa1ef5..b1b88de7 100644 --- a/python/pyphantomjs/filesystem.py +++ b/python/pyphantomjs/filesystem.py @@ -17,18 +17,18 @@ along with this program. If not, see . ''' -import os import codecs +import os import shutil import stat try: - from pwd import getpwuid, getpwnam from grp import getgrgid, getgrnam + from pwd import getpwuid, getpwnam except ImportError: pass -from PyQt4.QtCore import (pyqtSlot, pyqtProperty, QObject, QDateTime, - QFileInfo, qDebug) +from PyQt4.QtCore import (pyqtProperty, pyqtSlot, QDateTime, qDebug, + QFileInfo, QObject) from plugincontroller import do_action diff --git a/python/pyphantomjs/networkaccessmanager.py b/python/pyphantomjs/networkaccessmanager.py index 2b4bf5cf..0ace4771 100644 --- a/python/pyphantomjs/networkaccessmanager.py +++ b/python/pyphantomjs/networkaccessmanager.py @@ -17,8 +17,8 @@ along with this program. If not, see . ''' -from PyQt4.QtGui import QDesktopServices from PyQt4.QtCore import pyqtSignal, QDateTime +from PyQt4.QtGui import QDesktopServices from PyQt4.QtNetwork import (QNetworkAccessManager, QNetworkDiskCache, QNetworkRequest) diff --git a/python/pyphantomjs/phantom.py b/python/pyphantomjs/phantom.py index 3dd656b8..b527e827 100644 --- a/python/pyphantomjs/phantom.py +++ b/python/pyphantomjs/phantom.py @@ -26,11 +26,11 @@ from PyQt4.QtGui import QApplication from PyQt4.QtNetwork import QNetworkProxy, QNetworkProxyFactory from __init__ import __version_info__ -from utils import injectJsInFrame, QPyFile -from plugincontroller import do_action -from webpage import WebPage -from filesystem import FileSystem from encoding import Encode +from filesystem import FileSystem +from plugincontroller import do_action +from utils import injectJsInFrame, QPyFile +from webpage import WebPage class Phantom(QObject): diff --git a/python/pyphantomjs/plugincontroller.py b/python/pyphantomjs/plugincontroller.py index bdeeba9a..3064eacd 100644 --- a/python/pyphantomjs/plugincontroller.py +++ b/python/pyphantomjs/plugincontroller.py @@ -19,8 +19,8 @@ import os import sys -from glob import glob from collections import defaultdict +from glob import glob hooks = defaultdict(dict) diff --git a/python/pyphantomjs/pyphantomjs.py b/python/pyphantomjs/pyphantomjs.py index a9422caa..916209b1 100644 --- a/python/pyphantomjs/pyphantomjs.py +++ b/python/pyphantomjs/pyphantomjs.py @@ -28,7 +28,7 @@ import os import sys from PyQt4.QtCore import qInstallMsgHandler -from PyQt4.QtGui import QIcon, QApplication +from PyQt4.QtGui import QApplication, QIcon from plugincontroller import do_action # load plugins if running script directly @@ -38,9 +38,9 @@ if __name__ == '__main__': import resources from __init__ import __version__ +from config import Config from phantom import Phantom from utils import argParser, MessageHandler -from config import Config # make keyboard interrupt quit program import signal diff --git a/python/pyphantomjs/utils.py b/python/pyphantomjs/utils.py index eadebf13..91d526b3 100644 --- a/python/pyphantomjs/utils.py +++ b/python/pyphantomjs/utils.py @@ -17,13 +17,13 @@ along with this program. If not, see . ''' +import argparse +import codecs import os import sys -import codecs -import argparse -from PyQt4.QtCore import (QDateTime, QFile, Qt, QtDebugMsg, QtWarningMsg, - QtCriticalMsg, QtFatalMsg, qDebug) +from PyQt4.QtCore import (QDateTime, qDebug, QFile, Qt, QtCriticalMsg, + QtDebugMsg, QtFatalMsg, QtWarningMsg) from __init__ import __version__ from plugincontroller import do_action diff --git a/python/pyphantomjs/webpage.py b/python/pyphantomjs/webpage.py index 01ecb2cc..c979f9f8 100644 --- a/python/pyphantomjs/webpage.py +++ b/python/pyphantomjs/webpage.py @@ -20,17 +20,17 @@ from math import ceil, floor import sip -from PyQt4.QtCore import (pyqtProperty, pyqtSlot, pyqtSignal, Qt, QObject, - QRect, QPoint, QUrl, QFileInfo, QDir, QSize, - QSizeF, QByteArray, QEventLoop, QEvent) -from PyQt4.QtGui import (QPalette, QDesktopServices, QPrinter, QImage, - QPainter, QRegion, QApplication, QMouseEvent, - qRgba) -from PyQt4.QtWebKit import QWebSettings, QWebPage +from PyQt4.QtCore import (pyqtProperty, pyqtSignal, pyqtSlot, QByteArray, + QDir, QEvent, QEventLoop, QFileInfo, QObject, + QPoint, QRect, QSize, QSizeF, Qt, QUrl) +from PyQt4.QtGui import (QApplication, QDesktopServices, QImage, + QMouseEvent, QPainter, QPalette, QPrinter, + QRegion, qRgba) from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest +from PyQt4.QtWebKit import QWebPage, QWebSettings -from plugincontroller import do_action from networkaccessmanager import NetworkAccessManager +from plugincontroller import do_action from utils import injectJsInFrame