about summary refs log tree commit diff
path: root/kindlecomicconverter
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2017-03-25 08:05:28 +0100
committerPaweł Jastrzębski <pawelj@iosphe.re>2017-03-25 08:05:28 +0100
commit6526b139fdcd3b4c4f33507e96da4e8973203bd7 (patch)
tree322687bb17704b1b6675033159e10070e534347a /kindlecomicconverter
parentReimplemented HQ Panel View (close #223) (diff)
downloadkcc-6526b139fdcd3b4c4f33507e96da4e8973203bd7.tar.gz
kcc-6526b139fdcd3b4c4f33507e96da4e8973203bd7.tar.bz2
kcc-6526b139fdcd3b4c4f33507e96da4e8973203bd7.zip
Code cleanup
Diffstat (limited to 'kindlecomicconverter')
-rw-r--r--kindlecomicconverter/KCC_gui.py2
-rw-r--r--kindlecomicconverter/cbxarchive.py3
-rw-r--r--kindlecomicconverter/comic2panel.py6
-rw-r--r--kindlecomicconverter/shared.py2
-rw-r--r--kindlecomicconverter/startup.py5
5 files changed, 10 insertions, 8 deletions
diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py
index a8c7449..5a3b538 100644
--- a/kindlecomicconverter/KCC_gui.py
+++ b/kindlecomicconverter/KCC_gui.py
@@ -533,8 +533,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
     def clearJobs(self):
         GUI.jobList.clear()
 
-    # noinspection PyCallByClass,PyTypeChecker
     def openWiki(self):
+        # noinspection PyCallByClass
         QtGui.QDesktopServices.openUrl(QtCore.QUrl('https://github.com/ciromattia/kcc/wiki'))
 
     def modeChange(self, mode):
diff --git a/kindlecomicconverter/cbxarchive.py b/kindlecomicconverter/cbxarchive.py
index 7bd833f..7aba70f 100644
--- a/kindlecomicconverter/cbxarchive.py
+++ b/kindlecomicconverter/cbxarchive.py
@@ -16,12 +16,11 @@
 # PERFORMANCE OF THIS SOFTWARE.
 #
 
-import sys
 import os
 from zipfile import is_zipfile, ZipFile
 from subprocess import STDOUT, PIPE
 from psutil import Popen
-from shutil import move, copy
+from shutil import move
 from . import rarfile
 from .shared import check7ZFile as is_7zfile
 
diff --git a/kindlecomicconverter/comic2panel.py b/kindlecomicconverter/comic2panel.py
index f4fb6c6..f1c54e2 100644
--- a/kindlecomicconverter/comic2panel.py
+++ b/kindlecomicconverter/comic2panel.py
@@ -259,7 +259,8 @@ def main(argv=None, qtGUI=None):
                     raise UserWarning("Conversion interrupted.")
                 if len(mergeWorkerOutput) > 0:
                     rmtree(options.targetDir, True)
-                    raise RuntimeError("One of workers crashed. Cause: " + mergeWorkerOutput[0][0], mergeWorkerOutput[0][1])
+                    raise RuntimeError("One of workers crashed. Cause: " + mergeWorkerOutput[0][0],
+                                       mergeWorkerOutput[0][1])
             print("Splitting images...")
             for root, _, files in os.walk(options.targetDir, False):
                 for name in files:
@@ -282,7 +283,8 @@ def main(argv=None, qtGUI=None):
                     raise UserWarning("Conversion interrupted.")
                 if len(splitWorkerOutput) > 0:
                     rmtree(options.targetDir, True)
-                    raise RuntimeError("One of workers crashed. Cause: " + splitWorkerOutput[0][0], splitWorkerOutput[0][1])
+                    raise RuntimeError("One of workers crashed. Cause: " + splitWorkerOutput[0][0],
+                                       splitWorkerOutput[0][1])
                 if options.inPlace:
                     rmtree(options.sourceDir)
                     move(options.targetDir, options.sourceDir)
diff --git a/kindlecomicconverter/shared.py b/kindlecomicconverter/shared.py
index 00ae3b9..89e0b19 100644
--- a/kindlecomicconverter/shared.py
+++ b/kindlecomicconverter/shared.py
@@ -17,11 +17,9 @@
 #
 
 import os
-from sys import version_info
 from hashlib import md5
 from html.parser import HTMLParser
 from distutils.version import StrictVersion
-from time import sleep
 from shutil import rmtree, copy
 from tempfile import mkdtemp
 from zipfile import ZipFile, ZIP_DEFLATED
diff --git a/kindlecomicconverter/startup.py b/kindlecomicconverter/startup.py
index 4c47a17..aa78a0a 100644
--- a/kindlecomicconverter/startup.py
+++ b/kindlecomicconverter/startup.py
@@ -23,6 +23,7 @@ import sys
 from . import __version__
 from .shared import dependencyCheck
 
+
 def start():
     dependencyCheck(3)
     from . import KCC_gui
@@ -40,14 +41,16 @@ def start():
             KCCUI.handleMessage(sys.argv[1])
         sys.exit(KCCAplication.exec_())
 
+
 def startC2E():
     dependencyCheck(2)
     from .comic2ebook import main
     print('comic2ebook v' + __version__ + ' - Written by Ciro Mattia Gonano and Pawel Jastrzebski.')
     sys.exit(main(sys.argv[1:]))
 
+
 def startC2P():
     dependencyCheck(1)
     from .comic2panel import main
     print('comic2panel v' + __version__ + ' - Written by Ciro Mattia Gonano and Pawel Jastrzebski.')
-    sys.exit(main(sys.argv[1:]))
\ No newline at end of file
+    sys.exit(main(sys.argv[1:]))